App would like to use Auth0 to Sign In prompt displays on Logout (React Native)

Hello! I have implemented logout using the Auth0 client for React Native. We are using Auth0 Hosted Login and react-native-auth v2.3.0.

When the user presses the Logout button in our app, the following code runs.

However, this ALWAYS triggers an Alert in iOS with text "App would like to use Auth0 to Sign In’. This displays on Login, but SHOULD NOT display on Logout. It’s very confusing and undesirable from an end user perspective.

I’ve attached screenshots of the 4 steps the Logout process follows. Ideally, only the first and last steps would be needed.

Is this expected behavior in a React Native app - calling authorize() always triggers an alert dialog in the app??




Hi @aspinnler,

I am wondering if this is happening because you are instantiating a new auth0 class on logout. Can you try doing it similar to how the quickstart does it?

Here is a github example:

Thanks for the fast response Dan!

I copy-pasted this exact code block into my App.js AND I still see the same logout issue as noted in the original question. I’ve attached screenshots of the Logout flow for this code.




Can you try running the quickstart and see if you get the same behavior?

Hey Dan! Can you elaborate?
The React Native Quickstart is actually less complete - code wise - than the Github example which is both complete and self-contained code in a single App.js.

Any reason the Github example isn’t sufficient? Let me know if I’m missing any details.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.