Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/runtime/server/lib/oauth/auth0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ export interface OAuthAuth0Config {
* @see https://auth0.com/docs/authenticate/login/max-age-reauthentication
*/
maxAge?: number
/**
* Login connection. If no connection is specified, it will redirect to the standard Auth0 login page and show the Login Widget.
* @default ''
* @see https://auth0.com/docs/api/authentication#social
* @example 'github'
*/
connection?: string
}

export function auth0EventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthAuth0Config>) {
Expand Down Expand Up @@ -80,6 +87,7 @@ export function auth0EventHandler({ config, onSuccess, onError }: OAuthConfig<OA
scope: config.scope.join(' '),
audience: config.audience || '',
max_age: config.maxAge || 0,
connection: config.connection || ''
})
)
}
Expand Down