Delphic icon indicating copy to clipboard operation
Delphic copied to clipboard

Invalid username or password

Open cbmartinx opened this issue 1 year ago • 3 comments

I've created a superuser following the instructions in the README (i.e., sudo docker-compose -f local.yml run django python manage.py createsuperuser), but every time I try to log in I get the following error: "Invalid username or password". I've checked that the superuser I created actually exists (when I try to create another with the same name it says that username is taken), and I've also created additional superusers. Regardless I keep getting the same error.

cbmartinx avatar May 17 '23 21:05 cbmartinx

I have the same problem as @cbmartinx, even creating new users with full permissions from the django admin panel. Have you been able to solve the problem? Thank you very much for your answers, thanks!

jaisenbe58r avatar May 25 '23 09:05 jaisenbe58r

@cbmartinx It's possibly a frontend issue. If you deploy it on a remote host other than localhost, you should update the environment variable REACT_APP_API_ROOT_URL in the frontend/.env file.

iziang avatar Jun 14 '23 03:06 iziang

@cbmartinx @jaisenbe58r Open your browser dev tools and watch the requests that get made when you click Login. See why the XHR requests to /api/token/pair are failing. Do the OPTIONS and POST reqs both connect? What's the return code from the POST? Clicking "Login" is the first time the frontend tries to talk to Django, could be all sorts of things wrong

marauder37 avatar Jul 06 '23 06:07 marauder37