This guide walks you through creating a Google OAuth app in the Google Cloud Console. You’ll collect a Client ID and Client Secret, plus configure the JavaScript origins and redirect URIs that Clerk requires.Documentation Index
Fetch the complete documentation index at: https://docs.replit.com/llms.txt
Use this file to discover all available pages before exploring further.
This page covers only the provider-side setup in the Google Cloud Console. For the overall Clerk Auth flow — including enabling Google and entering credentials in the Auth pane — see Configuring OAuth credentials for an SSO provider in the Clerk Auth doc.
Prerequisites
- Access to the Google Cloud Console
- A published Replit app — custom OAuth credentials are only available in the Production environment
- The Google provider’s edit panel opened in: Auth pane → Configure tab → SSO providers section → select the Production environment → select Edit next to Google
Step 1: Create a Google OAuth app
Navigate to the Google Cloud Console:Create or select a project
- Select an existing project or create a new one from the project dropdown
- You’ll be redirected to your project’s Dashboard
Configure OAuth consent screen
- In the left sidebar, select the menu icon (≡) and select APIs & Services
- Select OAuth consent screen
- Configure your app’s consent screen with required information
- Save your changes
Create OAuth credentials
- From APIs & Services, select Credentials
- Select Create Credentials at the top, then select OAuth client ID
- Choose Web application as the application type
- Set Authorized JavaScript origins and Authorized redirect URIs to the exact values shown under Provider setup in the Auth pane. Add every value listed — your published domain and any custom domain are both included. See Configuring OAuth credentials for an SSO provider for how to find them.
- Select Create
- Save your Client ID and Client Secret
Troubleshooting
Redirect URI mismatch
- Verify the redirect URI in Google Cloud Console exactly matches the value shown under Provider setup in the Auth pane
- Ensure there are no trailing slashes or typos
- Wait a few minutes for Google’s configuration to propagate
Invalid client
- Double-check Client ID and Client Secret are copied correctly
- Ensure there are no extra spaces
- Verify OAuth consent screen is configured
Not working on custom domain
- Add the custom-domain entries shown under Provider setup in the Auth pane to both Authorized JavaScript origins and Authorized redirect URIs