Skip to main content

Type Alias: OnAuthorizeResult

OnAuthorizeResult = { approved: true; scopes?: string[]; subject: string; } | { approved: false; body?: unknown; redirect?: string; status?: number; }

Defined in: auth-core/src/oauthServerTypes.ts:183

Result of the app's consent/login hook.

approved: true issues a code and redirects back to the client. When the user is not authenticated, return approved: false with a redirect to your own login page (the adapter performs the redirect), or a status/body to render an inline response.