Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 4 additions & 2 deletions EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,10 @@ In the case of signup, you can add [an additional parameter](https://auth0.com/d
auth0.webAuth.authorize({
connection: realm,
scope: scope,
login_hint: email,
screen_hint: 'signup', // 👈🏻
additionalParameters: {
login_hint: email,
screen_hint: 'signup', // 👈🏻
},
});
```

Expand Down
29 changes: 29 additions & 0 deletions FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
9. [How can I prevent the autogenerated redirect_uri from breaking if the applicationId has mixed cases or special characters in it on Android?](#9-how-can-i-prevent-the-autogenerated-redirect_uri-from-breaking-if-the-applicationId-has-mixed-cases-or-special-characters-in-it-on-android)
10. [Why doesn't `await authorize()` work on the web? How do I handle login?](#10-why-doesnt-await-authorize-work-on-the-web-how-do-i-handle-login)
11. [Why do my users get logged out frequently? How do I keep them logged in?](#11-why-do-my-users-get-logged-out-frequently-how-do-i-keep-them-logged-in)
12. [How can I prompt users to the login page versus signup page?](#12-how-can-i-prompt-users-to-the-login-page-versus-signup-page)

## 1. How can I have separate Auth0 domains for each environment on Android?

Expand Down Expand Up @@ -337,3 +338,31 @@ const handleLogin = async () => {
```

By including this scope, the SDK will receive and securely store a `refreshToken`. This token will then be used by `getCredentials()` to maintain the user's session across app launches, providing a much smoother user experience.

## 12. How can I prompt users to the login page versus signup page?

If your application has one button for logging in and one button for signing up, you can prompt Auth0 to direct the user to the appropriate authentication page as such:

```js
const login = async () => {
await authorize({
scope: ...,
audience: ...,
additionalParameters: {
screen_hint: 'login'
}
});
// continue with login process!
}

const signup = async () => {
await authorize({
scope: ...,
audience: ...,
additionalParameters: {
screen_hint: 'signup'
}
});
// continue with signup process!
}
```