Sign in with Google or GitHub
OAuth is an extra way to sign in. It never creates accounts on its own: the email on the Google or GitHub account must already belong to a user, or have a pending invite. Only verified emails are accepted. If the user has two-step verification, it is still required.
Google
- In Google Cloud Console, create an OAuth client of type Web application.
- Add the redirect URI
https://<your-host>/api/oauth/google/callback. - Set
OAUTH_GOOGLE_CLIENT_IDandOAUTH_GOOGLE_CLIENT_SECRET.
GitHub
- Under Settings, Developer settings, create an OAuth App.
- Set the callback URL to
https://<your-host>/api/oauth/github/callback. - Set
OAUTH_GITHUB_CLIENT_IDandOAUTH_GITHUB_CLIENT_SECRET.
Make sure APP_URL matches the address people use, since the callback is built from it. The login page shows a button for each configured provider.