Add Google and GitHub sign-in
The sign-in and sign-up pages show a Google or GitHub button that signs users in through their existing account.
Google and GitHub sign-in are switched on separately in the admin console. Each needs an OAuth app registered with the provider, and changes apply to the next sign-in without a restart.
Before you begin
- A deployment with a public URL and Base URL set on Auth Config. See Set up email and password sign-in.
- An admin account with
config.readandconfig.write. - A Google Cloud project or a GitHub account where you can create an OAuth app.
Register the OAuth app
| Provider | Choose it for |
|---|---|
| Sign in using a Google web OAuth client | |
| GitHub | Sign in through a GitHub OAuth App |
Turn the provider on
Paste the credentials
In the Google Login or GitHub Login panel, fill in Client ID and Client Secret from the OAuth app page. The credential fields are never shown again after saving. Leave one blank to keep the stored value.
Set the switches
- Enabled: shows the provider's button on the sign-in and sign-up pages.
- Allow new users: when off, the provider only signs in people who already have an account.
Save
Click Save in that panel. The Login Channels panel shows which methods are enabled.
Buttons without credentials
An enabled button without both a client ID and a client secret shows a message that the provider needs them, and does not redirect.
Providers
Prop
Type
A provider without credentials resolves to a disabled provider, and the sign-in page does not offer it.
Verify
In a private browser window, open /auth/sign-in and click Continue with Google Login or Continue with GitHub Login. After approving on the provider's page you land on /app/profile. pnpm validate:auth also checks the not-configured state and the Auth Config wiring.
Troubleshooting
The provider rejects the redirect
The callback URL registered with Google or GitHub does not match the one in the Callback URLs panel. Copy it again, including the scheme and domain.
The user lands on /auth/error
The OAuth exchange failed after the redirect. Check that Client Secret belongs to the same app as Client ID. A secret regenerated with the provider must be pasted again.
A new user cannot sign in with the provider
Allow new users is off for that provider, so only existing accounts can use it. Turn it on and click Save.