I am using the
react-native-auth0 SDK in an react-native app to login users through the
webAuth.authorize hosted page. I do not see a corresponding logout function in the react-native SDK. There is a logout function for the webAuth library in
auth0.js for web based clients. How does a react-native user logout in this setup?
Currently, even though I can logout the user out of the app by destroying local state, the user remain logged in at the social provider and so is not prompted for credentials when they try to log in again.
I did a
fetch call to
/logout?federated and got a
200 OK response but the user is still logged in at the social provider (no prompt for credentials next time they try to login).
I tried the
Linking.openURL to call the /logout endpoint. The system browser is called as expected (same as during login) but the the user is not being logged out. Trying to sign in again, does not prompt the user for username/password, indicating that user is still logged in. The URL I am calling is:
I also opening the logout URL the same way
webAuth.authorize calls it using the A0Auth native module. Still no luck, user is not logged out of social identity provider (Google in my case).
Interestingly, when I look at Logs in Auth0 Dashboard I see several “Success Logout” messages as expected, but still user is able to login without prompt.