Resources
Section titled “Resources”Environment variables
Section titled “Environment variables”GOOGLE_CLIENT_ID=GOOGLE_CLIENT_SECRET=
Callback URL
Section titled “Callback URL”In your Google Cloud project, under “Authorized redirect URIs”, you need to add the callback URL.
/api/auth/google/callback
Google allows adding multiple redirect URIs, so add both your development and production URLs.
Config
Section titled “Config”The openid
, email
, and profile
scopes are requested by default.
import process from 'node:process'import { createAuth } from '@rttnd/gau/core'import { Google } from '@rttnd/gau/oauth';
export const auth = createAuth({ providers: [ Google({ clientId: process.env.GOOGLE_CLIENT_ID, clientSecret: process.env.GOOGLE_CLIENT_SECRET, }), ],});