mirror of
https://github.com/better-auth/better-auth.git
synced 2026-05-24 08:01:56 -05:00
chore: update google credentials instructions
This commit is contained in:
@@ -9,6 +9,22 @@ description: Google provider setup and usage.
|
||||
To use Google as a social provider, you need to get your Google credentials. You can get them by creating a new project in the [Google Cloud Console](https://console.cloud.google.com/apis/dashboard).
|
||||
|
||||
In the Google Cloud Console > Credentials > Authorized redirect URIs, make sure to set the redirect URL to `http://localhost:3000/api/auth/callback/google` for local development. For production, make sure to set the redirect URL as your application domain, e.g. `https://example.com/api/auth/callback/google`. If you change the base path of the auth routes, you should update the redirect URL accordingly.
|
||||
|
||||
<Callout type="info">
|
||||
**Creating Your Google OAuth Credentials**
|
||||
|
||||
If you haven't created OAuth credentials yet, follow these step-by-step instructions:
|
||||
|
||||
1. Open **Google Cloud Console** → **APIs & Services** → **Credentials**
|
||||
2. Click **Create Credentials** → **OAuth client ID**
|
||||
3. Choose **Web application**
|
||||
4. Add your redirect URIs:
|
||||
- `http://localhost:3000/api/auth/callback/google` (for local development)
|
||||
- `https://your-domain.com/api/auth/callback/google` (for production)
|
||||
5. Copy the **Client ID** and **Client Secret** into your environment variables
|
||||
|
||||
These steps avoid common issues such as `redirect_uri_mismatch`.
|
||||
</Callout>
|
||||
</Step>
|
||||
|
||||
<Step>
|
||||
|
||||
Reference in New Issue
Block a user