From d2e14f1c89bf75ce779bf3d0447f8c47906eef2d Mon Sep 17 00:00:00 2001 From: Silvio Eckl Date: Thu, 18 Jan 2024 19:59:27 +0100 Subject: [PATCH 1/2] feat: add connection param for auth0 --- src/runtime/server/lib/oauth/auth0.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/runtime/server/lib/oauth/auth0.ts b/src/runtime/server/lib/oauth/auth0.ts index b1fd967b..f1ae42e5 100644 --- a/src/runtime/server/lib/oauth/auth0.ts +++ b/src/runtime/server/lib/oauth/auth0.ts @@ -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) { @@ -80,6 +87,7 @@ export function auth0EventHandler({ config, onSuccess, onError }: OAuthConfig Date: Thu, 18 Jan 2024 21:27:49 +0100 Subject: [PATCH 2/2] fix: correct comment --- src/runtime/server/lib/oauth/auth0.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/server/lib/oauth/auth0.ts b/src/runtime/server/lib/oauth/auth0.ts index f1ae42e5..397321ae 100644 --- a/src/runtime/server/lib/oauth/auth0.ts +++ b/src/runtime/server/lib/oauth/auth0.ts @@ -47,7 +47,7 @@ export interface OAuthAuth0Config { maxAge?: number /** * Login connection. If no connection is specified, it will redirect to the standard Auth0 login page and show the Login Widget. - * @default ''' + * @default '' * @see https://auth0.com/docs/api/authentication#social * @example 'github' */