Prerequisites
- Create a Google Cloud account.
Steps to able to sign in with google
- To enable "Sign in with Google", you need to create a project in the Google Cloud Console.
- Go to the Google Cloud Console.
- Create a new project or select an existing one.
- Navigate to APIs & Services > Credentials.
- Click Create Credentials > OAuth client ID.
- Select Web application as the application type.
- Authorized JavaScript origins:
http://localhost:3000(for local dev)https://your-production-url.com
- Authorized redirect URIs:
http://localhost:3000/api/auth/callback/googlehttps://your-production-url.com/api/auth/callback/google
- Copy the Client ID and Client Secret.
- Add them to your
.envfile:
AUTH_GOOGLE_CLIENT_ID=your_client_id
AUTH_GOOGLE_CLIENT_SECRET=your_client_secret
