[ReactNative][Auth0][Clear Session]How to Configure Logout Message iOS Auth0

Why an alert pops up when I use clearsession to log out on RN ios APP?
It says “xxx wants to use Auth0 to LOG IN!!” !! I am actually trying to logging out.

If there is no way to dismiss this mesasge or change it? Then how can I actually log user out from Auth0 session?

Thanks.

1 Like

Hey @lyc2861131,

Welcome to the community! A code sample would be helpful here, could you provide one? Generally, you’re looking to do something along these lines:

auth0.webAuth
    .clearSession({})
    .then(success => {
        Alert.alert(
            'Logged out!'
        );
        this.setState({ accessToken: null });
    })
    .catch(error => {
        console.log('Log out cancelled');
    });

This shouldn’t create any unwanted popups.

Hi! Thanks for replying. This is actually the code I an using sorry dont have access to it rn. But with this when I click on log out, the same sign in alert pops up as described. “xxx wants to use auth0 to sign in”.

Anyone else has this issue?

1 Like

Hi! Thanks for replying. This is actually the code I an using sorry dont have access to it rn. But with this when I click on log out, the same sign in alert pops up as described. “xxx wants to use auth0 to sign in”.

Hey @lyc2861131,

Thank you for your patience. Looks like @matt.macadam figured most of it out: Swift login alert shows up when you logout - #21 by matt.macadam.

Please, give it a shot, and let me know if it works for your.

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