Auth0Provider may need an ephermeralSession option for initial load?
Opened this issue · 0 comments
Checklist
- The issue can be reproduced in the react-native-auth0 sample app (or N/A).
- I have looked into the Readme, Examples, and FAQ and have not found a suitable solution or answer.
- I have looked into the API documentation and have not found a suitable solution or answer.
- I have searched the issues and have not found a suitable solution or answer.
- I have searched the Auth0 Community forums and have not found a suitable solution or answer.
- I agree to the terms within the Auth0 Code of Conduct.
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