Configuration
Create a shared config object that is imported by your route handler, server utilities, and proxy.
Generate a strong SESSION_SECRET:
openssl rand -base64 32Config reference
| Field | Required | Default | Description |
|---|---|---|---|
endpoint | ✓ | — | Authgear endpoint, e.g. https://myapp.authgear.cloud |
clientID | ✓ | — | OAuth client ID |
redirectURI | ✓ | — | OAuth callback URL |
sessionSecret | ✓ | — | Encrypts 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