Nudgra uses Google OAuth for dashboard sign-in. Create one web application credential in the Google Cloud Console, then set the redirect URI that matches your distribution.
Create OAuth credentials
Open the Google Cloud Console
Create or select a Google Cloud project.
Create OAuth credentials
Create credentials for a web application.
Set the authorized origin and redirect URI
Use the values for your distribution below.
Copy the client ID and secret
Store the values in your local and production environments.
If Google asks for an authorized domain, use the root domain. For example, use example.com when your app is on https://nudgra.example.com.
Local values
Authorized JavaScript origin:
http://localhost:3000
Authorized redirect URI:
http://localhost:3000/api/auth/callback/google
Put the client ID and secret in .env:GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
Use your local Convex site URL as the redirect URI, not the Next.js app URL.Authorized JavaScript origin:
http://localhost:3000
Authorized redirect URI:
https://your-dev-deployment.convex.site/api/auth/callback/google
Put the client ID and secret in .env.local or on your Convex dev deployment:AUTH_GOOGLE_ID=your-google-client-id
AUTH_GOOGLE_SECRET=your-google-client-secret
Production values
Authorized JavaScript origin:
https://your-domain.com
Authorized redirect URI:
https://your-domain.com/api/auth/callback/google
Put the client ID and secret in .env:GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
Restart after changing .env:docker compose up -d --build
Authorized JavaScript origin:
https://your-app-domain.com
Authorized redirect URI:
https://your-convex-site.convex.site/api/auth/callback/google
Set the values on Convex production:npx convex env set --prod AUTH_GOOGLE_ID your-google-client-id
npx convex env set --prod AUTH_GOOGLE_SECRET your-google-client-secret
Redeploy after changing hosted values:npx convex deploy --cmd "npm run build"
For Nudgra Cloud, the Google OAuth redirect URI uses the Convex site URL. Do not use https://your-app-domain.com/api/auth/callback/google.