iOS clear auth0 cookies on fresh install from previous deleted versions

Hi,

I’m currently calling Auth0.webAuth().start on iOS to start the login flow with auth0.
Everything works as expected but we’re having some problems with the fact that auth0 is saving some cookies that give us the following behaviour.

As a user I’m logging in into the app with auth0, then delete the app. I then reinstall the app and try to login again with a different account.
The problem I am seeing is that auth0 knows that I logged in before and just retrieves the previous accessToken from the previous session before deleting the app.

On app start on fresh install I tried cleaning the credential manager with:

let credentialsManager = CredentialsManager(authentication: Auth0.authentication())
let result = credentialsManager.clear()

but in this situation result is false

What can I do to clean the cookies and have auth0 restart the login flow on fresh install ?

1 Like