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, }), ],})
Provider params
Section titled “Provider params”params
Section titled “params”Type:
Record<string, string>
Default: —
Extra query params appended to the authorization URL.