Show appropriate help when signing in using OAuth if the provider account is disconnected from user settings
Opened this issue · 2 comments
Not sure whether it is a bug or a feature.
Steps to reproduce (reproducible on staging):
- Login (using any means)
- Disconnect GitHub in settings
- Log out
- Try signing in with GitHub.
Expectation: I sign in again and my account gets reconnected to GitHub.
Current outcome: Attempts to create a new user, fails unique constraint checks on username and email.
That's the expected behavior. We can improve the unique constraints check a bit, however. If we have the email address on file already we should suggest "Your email address email@example.com is already associated with a LibreCores account. If you want to log in through GitHub, please connect your account to GitHub by first logging in with your email address and your password, and then connect your account to GitHub. You can also reset your password if you forgot it or never set a password."
(Add links as needed.)
Edit: Slightly improved suggested message to tell users what to do if they never set a password.
Changed title to reflect the new action item