Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Support sign in and sign up with GH/GL/BB #4022
While this was technically supported if you knew the URLs, this adds formal support for logging in and signing up with our providers (currently GitHub, BitBucket, and GitLab).
How this works
Let's say your user account already is connected to GitHub because you actually use Read the Docs with your GitHub account. The "Sign in with GitHub" button will just work for you. You can still use your old username and password if you like.
If your GitHub account is not connected to anything and you click the "Sign in with GitHub", you will authenticate with GitHub, and then you will get a confirmation screen where you tie your GitHub account and email to a new Read the Docs username (see screenshot below). After confirming, you'll be logged in. The first and last name may be populated from the provider if available.
BitBucket works exactly the same as GitHub. I didn't actually test GitLab but I assume it does.
Note: There is no technical difference between the "Sign in with.." and "Sign up with.." buttons. If your social account is already connected to a user account, you will be logged in. If it isn't, you will be asked to confirm a new sign up.
Weird edge cases
Looks good to me. I do worry about the edge cases that you mention, which is folks who disconnect their social account and then get locked out.
I guess that isn't any different than losing your password though, so being able to recover it is a good enough solution in that case.
The only way to retrieve the account in this case is with a password reset to the email on file.
Did you test this flow? I'm not sure yet, but I think that our password reset flow may not work if there is no password in the User object.
The setting is
I'll make the settings match in dev and open a PR for the production settings.
Edit: it looks like no changes should be necessary in prod. The default value is the same as