purveshmakode24/blog-medium

Password Reset Emails don't come if Authenticated via social_django [google auth]

Opened this issue · 0 comments

Describe the bug
A user who authenticated using "social_django" won't be able to reset or set the password.

All the emails that are registered through "social_django" backend do not have any passwords set in their account. So, If the same user try to reset their password from the form, they do not get email in their mailbox, and the users who registered via django backend receive the email properly.

To Reproduce
Steps to reproduce the behavior:

  1. Sign in with Google Account. [Make sure you didn't create an account with the same email id using sign up form before]
  2. Log out from your Account.
  3. Go to login page and click "Forgot Password?".
  4. Enter your required email id. [Make sure you enter the same email id as of Google Account]
  5. You won't get an email; And thus you won't be able to set the password.

Expected behavior

  • In case of social auth, either make "Forgot Password?" link to be used to "Set Password"
  • OR
If a/c doesn't have password set initially - because, as social_auth authentication doesn't set password by default
{
	Give option to "Set the Password" in the user's profile.
} 
else 
{
	Give option to "Change the Password" (including enter your old password for verification) in the user's profile if the password is already present. 
}