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

Auth0Provider may need an ephermeralSession option for initial load? #992

Open
6 tasks done
NicholasGWK opened this issue Oct 22, 2024 · 0 comments
Open
6 tasks done
Labels
bug This points to a verified bug in the code

Comments

@NicholasGWK
Copy link

Checklist

Description

Reading up on ephemeralSession, it seems that on iOS passing this property should prevent the iOS SSO dialog from showing; all good, seems to work, especially on logout.

However, it seems like the <Auth0Provider> on mount is trying to see if the user is logged in...it goes to isLoading immediately, and will correctly keep a user logged in. But, it appears this background initial check or whatever is happening is NOT taking ephermeralSession into account, or at least I couldn't find a config parameter for it.

The consequence is even if I intend to use ephemeralSession: true when I go to authorize, the initial check still pops the dialog and makes the user confirm or cancel, which kind of ruins the whole point of ephemeral session in the first place.

Reproduction

Can't do a small repo right now, but I imagine you'd see it like this still:

  • Expo app, setup with a custom login domain
  • Wrap main app in <Auth0Provider>
  • Call const { authorize, isLoading, user } = useAuth0(); or similar in a mounted component
  • Dialog on iOS will pop for SSO

Additional context

No response

react-native-auth0 version

3.2.1

React Native version

0.74.5

Expo version

51

Platform

iOS

Platform version(s)

15

@NicholasGWK NicholasGWK added the bug This points to a verified bug in the code label Oct 22, 2024
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