Skip to Content
Getting StartedConfiguration

Configuration

Create a shared config object that is imported by your route handler, server utilities, and proxy.

lib/authgear.ts
.env.local

Generate a strong SESSION_SECRET:

openssl rand -base64 32

Config reference

FieldRequiredDefaultDescription
endpointAuthgear endpoint, e.g. https://myapp.authgear.cloud
clientIDOAuth client ID
redirectURIOAuth callback URL
sessionSecretEncrypts the session cookie (min 32 chars)
postLogoutRedirectURI"/"Redirect target after logout
scopes["openid", "offline_access", "https://authgear.com/scopes/full-userinfo"]OAuth scopes
cookieName"authgear.session"Session cookie name
Last updated on