Skip to content
Advertisement

Tag: django-rest-auth

Password reset django-allauth and django-rest-auth

I cannot wrap my head around this problem. Read a lot of solutions but cannot seem to find the correct combination that works for me. I want to initiate a users password reset flow from within my (android/iOS) app. I think I need django-rest-auth for this to expose an API endpoint something like this: Now posting to http://127.0.0.1:8000/password/reset/ with a

After login the `rest-auth`, how to return more information?

I use django-rest-auth in my Django project. After login the rest-auth/login/, how to return more information? In the rest-auth/login/, when I login the user, it returns a key. I want to also return the user’s information, how can I get this? Answer At last, I get my solution: In the project settings.py, add the TOKEN_SERIALIZER like bellow: Now I get

Field name `username` is not valid for model

I am attempting to use rest-auth supplied serialisers to GET (*with headers) user details from the defined endpoint /rest-auth/user/ (*with headers (Content-Type: application/json Authorization: Token 1a5472b2af03fc0e9de31fc0fc6dd81583087523 )) I am getting the following traceback: https://dpaste.de/oYay#L I have defined custom user model (using email rather than username)as such: Settings as follows: Not sure how to go about correcting this error.. so that

Advertisement