Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User not created when posting the code at jwt_pair endpoint #125

Open
OdifYltsaeb opened this issue May 28, 2020 · 3 comments
Open

User not created when posting the code at jwt_pair endpoint #125

OdifYltsaeb opened this issue May 28, 2020 · 3 comments

Comments

@OdifYltsaeb
Copy link

Hi!

from here: https://github.com/st4lk/django-rest-social-auth#oauth-20-workflow-with-rest-social-auth anybody can read that "Backend will either sign in the user, either signup, either return an error."

I always took it that it means 1) if user exists, sign in, 2) if not, sign up, 3), something goes wrong, return an error.

But with empty database user is not created for whatever reason. and instead the response is: {"detail":"User not found","code":"user_not_found"}

@OdifYltsaeb
Copy link
Author

Why is it important to specify authenticators as [JWTAuthentication()] in SimpleJWTAuthMixin ? Why does the view, that returns token and refresh token pair need authentication anyway?

As far as I know, that's what stopping user being created during the request in backends pipeline. When I override this and return [] in this method, then everything seems to work fine (seems because I actually have not tested it fully)

@ajaiau0
Copy link

ajaiau0 commented Oct 13, 2021

in every request, it appear
{
"detail": "User not found",
"code": "user_not_found"
}

@abu-sayem
Copy link

@ajaiau0 Have you got any solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants