react-native-auth0
react-native-auth0 copied to clipboard
webAuth.authorize function doesn't behave as expected
Checklist
- [X] The issue can be reproduced in the react-native-auth0 sample app (or N/A).
- [X] I have looked into the Readme, Examples, and FAQ and have not found a suitable solution or answer.
- [X] I have looked into the API documentation and have not found a suitable solution or answer.
- [X] I have searched the issues and have not found a suitable solution or answer.
- [X] I have searched the Auth0 Community forums and have not found a suitable solution or answer.
- [X] I agree to the terms within the Auth0 Code of Conduct.
Description
According to the documentation, if we have a valid session, when using the webAuth.authorize
function and not passing in a additionalParameters: { prompt: ... }
value, the modal should close right away and the user would automatically be logged in, as the cookie will still be there.
I've tried this behaviour, but it doesn't work as expected, I seem to be prompted every time with the login page, regardless of not passing the prompt: 'login'
additionalParameters
and having a valid session.
I have verified that we're indeed able to get authenticated if using the prompt: 'none'
without displaying the login page, so, this does seem like a bug.
Reproduction
- Login via
auth0.webAuth.authorize(..., scope, audience, etc...)
- _tried both with email, or SMS connections, no difference) - Note, we're not passingadditionalParameteres
- You'll receive the
Credentials
response. - Save it, and so on, with credentials manager.
- Trigger again the
auth0.webAuth.authorize(..., scope, audience, etc...)
- You'll be shown thelogin
page again, although a session (hence, cookies) was existing. - Note, we're not passingadditionalParameteres
Additional context
No response
react-native-auth0 version
3.1.0
React Native version
0.71.14
Expo version
48.0.21
Platform
Android, iOS
Platform version(s)
macOS: macOS Sonoma 14.3.1; Xcode: 15.2