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

Reset password mail is not sent for user authenticated with OAuth #367

Open
Bohooslav opened this issue Mar 31, 2022 · 2 comments
Open

Reset password mail is not sent for user authenticated with OAuth #367

Bohooslav opened this issue Mar 31, 2022 · 2 comments

Comments

@Bohooslav
Copy link

Bohooslav commented Mar 31, 2022

Expected behaviour

I want users authenticated with OAuth to be able to reset their password through standard Django resetting password method, through mail.

Actual behaviour

Despite user being registered with Google, for example, he doesn't get a reset password mail to the gmail of his account he used to sign up with OAuth.

What are the steps to reproduce this issue?

  1. Sign up with Google
  2. Log out.
  3. Try to get reset password mail on yourwebste.com/accounts/password_reset/

Any logs, error output, etc?

No

@petrprikryl
Copy link

Problem is here https://github.com/django/django/blob/4.0.5/django/contrib/auth/forms.py#L303 because users created via social auth will not have has_usable_password. So maybe setting some random very strong password to the user while sign up could bypass this problem?

@atodorov
Copy link
Contributor

So maybe setting some random very strong password to the user while sign up could bypass this problem?

FTR that's exactly what we do in one of our apps:
https://github.com/kiwitcms/enterprise/blob/master/tcms_enterprise/pipeline.py#L29

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

No branches or pull requests

3 participants