Django (using TokenAuthentication): “non_field_errors”: "Unable to log in with provided credentials?

前端 未结 2 1907
萌比男神i
萌比男神i 2021-01-21 05:17

I\'m using httpie to test my custom authentication.

http POST http://127.0.0.1:8000/api-token-auth/ username=\'username1\' password=\'Password123\'
2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-21 05:52

    OK I solved it. Inside my settings, I just had to remove the AUTHENTICATIONS_BACKEND. I thought my custom backend was different for merely logging a user in and the token authentication backend worked to get that token.

提交回复
热议问题