400 error when logging in when using email only mode.
See original GitHub issueI am trying to set up authentication using django-rest-auth and django-allauth. The user exists in the database and I can login to the django admin site. When I try to login using the rest-auth/login/ endpoint posting email/password, I receive a 400 error with the following response:
{
"non_field_errors": [
"Unable to log in with provided credentials."
]
}
I followed the instructions here: http://django-allauth.readthedocs.io/en/latest/configuration.html#configuration
In my settings file I have the following:
ACCOUNT_EMAIL_REQUIRED = True
ACCOUNT_UNIQUE_EMAIL = True
ACCOUNT_AUTHENTICATION_METHOD = 'email'
If I comment out the three lines above and use the same endpoint but add the username it works. It seems to only not work with email only mode.
Thanks for your help!
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
How to Fix a 400 Bad Request Error (Causes and Fixes)
The 400 Bad Request error indicates that the server cannot or process the request due to a client error. Read about the common...
Read more >Gmail in Chrome only gets a 400 error
Gmail error 400 appears on your web browser if you have multiple accounts and try to sign in. You may face the “Bad...
Read more >What is HTTP error 400 and how do you fix it? - IT PRO
It's hard not to be unfazed by an HTTP error that tells you little about the problem. That said, fixing a 400 Bad...
Read more >How to Fix a 400 Bad Request Error: 8 Easy Methods
The HTTP status 400 – bad request indicates that the request sent to the server is invalid or corrupted. Just like other 4xx...
Read more >Fix Google Chrome Bad Request Error 400
Google Chrome Bad Request error 400 indicates the server could not understand or process the request sent by your browser. What causes bad...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I left out AUTHENTICATION_BACKENDS in settings. That was the issue.
Oh my. @genomics-geek thank you very much, I have spent about 1.5 hours to try to fix this problem. I do not think that moving from JWT to Bearer Token will so long in the new project. Thank you again.