Skip to Content
API ReferenceProxyInterfacesInterface: AuthgearProxyOptions

@authgear/nextjs


@authgear/nextjs / proxy / AuthgearProxyOptions

Interface: AuthgearProxyOptions

Defined in: src/proxy.ts:9 

Extends

Properties

clientID

clientID: string

Defined in: src/types.ts:5 

OAuth client ID

Inherited from

AuthgearConfig.clientID


cookieName?

optional cookieName: string

Defined in: src/types.ts:15 

Session cookie name. Defaults to “authgear.session”

Inherited from

AuthgearConfig.cookieName


endpoint

endpoint: string

Defined in: src/types.ts:3 

Authgear endpoint, e.g. “https://myapp.authgear.cloud 

Inherited from

AuthgearConfig.endpoint


isSSOEnabled?

optional isSSOEnabled: boolean

Defined in: src/types.ts:24 

Whether to enable SSO (Single Sign-On) with other apps on the same Authgear tenant. When true (default), Authgear silently reuses its server-side session if the user is already logged in, so users are not prompted for credentials again. Set to false to always show the login form (prompt=login), which is recommended for single-app deployments where silent sign-in feels unexpected to the user. Defaults to true.

Inherited from

AuthgearConfig.isSSOEnabled


loginPath?

optional loginPath: string

Defined in: src/proxy.ts:26 

URL to redirect unauthenticated users. Defaults to “/api/auth/login”.


postLogoutRedirectURI?

optional postLogoutRedirectURI: string

Defined in: src/types.ts:9 

Where to redirect after logout

Inherited from

AuthgearConfig.postLogoutRedirectURI


protectedPaths?

optional protectedPaths: string[]

Defined in: src/proxy.ts:14 

Paths that require authentication. Unauthenticated requests are redirected to login. Supports exact paths and prefix patterns ending with * (e.g. “/dashboard/*“).


publicPaths?

optional publicPaths: string[]

Defined in: src/proxy.ts:21 

Paths that are always public (never redirected to login). Takes precedence over protectedPaths. Defaults to [“/api/auth/*“].


redirectURI

redirectURI: string

Defined in: src/types.ts:7 

Redirect URI for OAuth callback, e.g. “http://localhost:3000/api/auth/callback 

Inherited from

AuthgearConfig.redirectURI


scopes?

optional scopes: string[]

Defined in: src/types.ts:11 

OAuth scopes. Defaults to [“openid”, “offline_access”, “https://authgear.com/scopes/full-userinfo ”]

Inherited from

AuthgearConfig.scopes


sessionSecret

sessionSecret: string

Defined in: src/types.ts:13 

Secret key for encrypting session cookie (min 32 chars)

Inherited from

AuthgearConfig.sessionSecret

Last updated on