Google Authentication
Follow these steps to set up Google Authentication.
Step 1: Create a Google Cloud Project
- Go to Google Cloud Console.
- Create a new project.
- Navigate to “APIs & Services” > “Credentials.”
- Click “Create Credentials” and select “OAuth 2.0 Client IDs.”
- Configure your consent screen and create a new OAuth 2.0 client ID.
- Under “Authorized redirect URIs,” add your redirect URL:
- http://localhost:3000/api/auth/callback/googlefor local development.
- https://example.com/api/auth/callback/googlefor production.
 
Step 2: Copy Credentials to .env.local
- After creating your OAuth credentials, copy the Client IDandClient Secretprovided by Google.
- In your project’s .env.localfile, add the following environment variables, and paste the values.- GOOGLE_CLIENT_ID
- GOOGLE_CLIENT_SECRET