From b99774bdc9d3d77254e7e1fa92d16beeb82f059c Mon Sep 17 00:00:00 2001 From: Frederik Prijck Date: Wed, 20 Nov 2024 09:34:58 +0100 Subject: [PATCH 1/4] Add connection parameter to FAQ --- FAQ.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/FAQ.md b/FAQ.md index 443c11a2..5133c6f8 100644 --- a/FAQ.md +++ b/FAQ.md @@ -288,3 +288,33 @@ providers: [ } ], ``` + +## 10. How can I skip the Auth0 login page? + +When integrating with third party providers such as Google or Microsoft, being redirected to Auth0 before being redirected to the corresponding provider, can be sub-optimal in terms of user-experience. +If you only have a single connection enabled, or you know up front how the user wants to authenticate, you can set the `connection` parameter when calling `loginWithRedirect()` or `loginWithPopup`: + +``` +this.auth.loginWithRedirect({ + // ... + authorizationParams: { + connection: 'connection_logical_identifier' + } +}) +``` + +Doing so for connections such as Google or Microsoft, would automatically redirect you to them instead of showing the Auth0 login page first. + +Additionally, if you are using our AuthGuard, you may want it to pick up the same connection when it would redirect for login. To do so, you should provide the `connection` property when configuring Auth0: + +``` +bootstrapApplication(AppComponent, { + providers: [ + provideAuth0({ + authorizationParams: { + connection: 'connection_logical_identifier' + } + }), + ] +}); +``` From 26df12c5bb4744a0d65449a87c70d6d0317f32b8 Mon Sep 17 00:00:00 2001 From: Frederik Prijck Date: Wed, 20 Nov 2024 09:35:38 +0100 Subject: [PATCH 2/4] Update FAQ.md --- FAQ.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FAQ.md b/FAQ.md index 5133c6f8..66179ced 100644 --- a/FAQ.md +++ b/FAQ.md @@ -291,7 +291,7 @@ providers: [ ## 10. How can I skip the Auth0 login page? -When integrating with third party providers such as Google or Microsoft, being redirected to Auth0 before being redirected to the corresponding provider, can be sub-optimal in terms of user-experience. +When integrating with third party providers such as Google or Microsoft, being redirected to Auth0 before being redirected to the corresponding provider can be sub-optimal in terms of user-experience. If you only have a single connection enabled, or you know up front how the user wants to authenticate, you can set the `connection` parameter when calling `loginWithRedirect()` or `loginWithPopup`: ``` From f7647346525777cba999ed3b8819f3978d1d1bbf Mon Sep 17 00:00:00 2001 From: Frederik Prijck Date: Wed, 20 Nov 2024 09:36:29 +0100 Subject: [PATCH 3/4] Update FAQ.md --- FAQ.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FAQ.md b/FAQ.md index 66179ced..d4a44ebb 100644 --- a/FAQ.md +++ b/FAQ.md @@ -292,7 +292,7 @@ providers: [ ## 10. How can I skip the Auth0 login page? When integrating with third party providers such as Google or Microsoft, being redirected to Auth0 before being redirected to the corresponding provider can be sub-optimal in terms of user-experience. -If you only have a single connection enabled, or you know up front how the user wants to authenticate, you can set the `connection` parameter when calling `loginWithRedirect()` or `loginWithPopup`: +If you only have a single connection enabled, or you know up front how the user wants to authenticate, you can set the `connection` parameter when calling `loginWithRedirect()` or `loginWithPopup()`: ``` this.auth.loginWithRedirect({ From 2774d885a05b0409c7e44a07f46e8b0d2f67ec14 Mon Sep 17 00:00:00 2001 From: Frederik Prijck Date: Wed, 20 Nov 2024 09:40:00 +0100 Subject: [PATCH 4/4] Update FAQ.md --- FAQ.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/FAQ.md b/FAQ.md index d4a44ebb..6a004428 100644 --- a/FAQ.md +++ b/FAQ.md @@ -11,6 +11,7 @@ 7. [Using the SDK with Angular Universal](#7-using-the-sdk-with-angular-universal) 8. [Retrieving and refreshing a token](#8-retrieving-and-refreshing-a-token) 9. [When using localOnly logout, the user is getting logged in again](#9-when-using-localonly-logout-the-user-is-getting-logged-in-again) +9. [Skip the Auth0 login page?](#10-skip-the-auth0-login-page) ## 1. User is not logged in after page refresh @@ -289,7 +290,7 @@ providers: [ ], ``` -## 10. How can I skip the Auth0 login page? +## 10. Skip the Auth0 login page When integrating with third party providers such as Google or Microsoft, being redirected to Auth0 before being redirected to the corresponding provider can be sub-optimal in terms of user-experience. If you only have a single connection enabled, or you know up front how the user wants to authenticate, you can set the `connection` parameter when calling `loginWithRedirect()` or `loginWithPopup()`: @@ -318,3 +319,5 @@ bootstrapApplication(AppComponent, { ] }); ``` + +ℹ️ You can find the connection's logical identifier as the **connection name** in the connection settings in the Auth0 dashboard for your tenant.