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

In auth.py check user exists before calling user_obj.verify_password(password) #1

Open
MahmudulHassan5809 opened this issue Dec 30, 2021 · 1 comment

Comments

@MahmudulHassan5809
Copy link

MahmudulHassan5809 commented Dec 30, 2021

    # step 1
    try:
        user_obj = User.objects.get(email=email)
    except Exception as e:
        user_obj = None
    if user_obj:
        if not user_obj.verify_password(password):
            return None
    return user_obj```
@princewillingoo
Copy link

This helped me resolve my issue. thanks man

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

2 participants