Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

screen_hint: "signup" is not reliable -- apple logins in particular #926

Open
6 tasks done
mprevdelta opened this issue Jun 20, 2024 · 1 comment
Open
6 tasks done
Labels
bug This points to a verified bug in the code

Comments

@mprevdelta
Copy link

Checklist

Description

So after consulting the examples for a "signup" workflow I found the "screen_hint" option which can be used to (usually) direct a user to the signup mode of the Lock screen.

This is important for our users as many fail to find the "signup" option on Auth0's default lock, so we use this to explicitly send them there.

For password logins this seems to work fine, but for Apple logins on iPhone's, this prompt seems to fail after the user has logged in once.

Reproduction

  1. Login with the Apple social login
  2. Use any combination of clearCredentials and/or clearSession to log the user out.
  3. Invoke authorize() with screen_hint="login" in additionalParameters
  4. User automatically logs in as the Apple user from step 1.

Additional context

No response

react-native-auth0 version

3.2.1

React Native version

0.74.2

Expo version

51

Platform

iOS

Platform version(s)

14

@mprevdelta mprevdelta added the bug This points to a verified bug in the code label Jun 20, 2024
@mprevdelta
Copy link
Author

The root issue here may be the clearCredentials() and clearSession() don't fully clear the session.

If I manually invoke the logout through WebBrowser it seems to more fully clear the session and the signup hint correctly applies...

const params = {
  client_id: AUTH0_CLIENT_ID
};

const queryParams = toQueryString(params);
const logoutUrl = `https://${AUTH0_DOMAIN}/v2/logout/${queryParams}`;
await WebBrowser.openAuthSessionAsync(logoutUrl, {
  dismissButtonStyle: 'done',
  showInRecents: false,
  readerMode: true
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This points to a verified bug in the code
Projects
None yet
Development

No branches or pull requests

1 participant