Skip to content

Commit b99774b

Browse files
Add connection parameter to FAQ
1 parent 81dd79c commit b99774b

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

FAQ.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,3 +288,33 @@ providers: [
288288
}
289289
],
290290
```
291+
292+
## 10. How can I skip the Auth0 login page?
293+
294+
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.
295+
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`:
296+
297+
```
298+
this.auth.loginWithRedirect({
299+
// ...
300+
authorizationParams: {
301+
connection: 'connection_logical_identifier'
302+
}
303+
})
304+
```
305+
306+
Doing so for connections such as Google or Microsoft, would automatically redirect you to them instead of showing the Auth0 login page first.
307+
308+
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:
309+
310+
```
311+
bootstrapApplication(AppComponent, {
312+
providers: [
313+
provideAuth0({
314+
authorizationParams: {
315+
connection: 'connection_logical_identifier'
316+
}
317+
}),
318+
]
319+
});
320+
```

0 commit comments

Comments
 (0)