Auth0 automatically logs in user on second time

For first time Auth0 launches login screen just fine, but when i log out, and login again, it automatically logs in without showing the login screen.

If i remove chrome history then it seems to be working fine.

My code to initialize Auth0.

auth0 = new Auth0(GlobalApplication.getAppContext());
        auth0.setLoggingEnabled(true);
        auth0.setOIDCConformant(true);
        credentialsManager = new SecureCredentialsManager(GlobalApplication.getAppContext(),
                new AuthenticationAPIClient(auth0), new SharedPreferencesStorage(GlobalApplication.getAppContext()));

This is my code to login.

public void doLogin(Activity activity){

    WebAuthProvider.init(auth0)
            .withScheme("com.package.app")
            .withAudience(String.format("https://%s/api/",
                    AUTH0_DOMAIN))
            .withScope("openid profile email offline_access read:current_user update:current_user_metadata")
            .start(activity, webCallback);

}



private final AuthCallback webCallback = new AuthCallback() {
    @Override
    public void onSuccess(@NonNull Credentials credentials) {
        credentialsManager.saveCredentials(credentials);
        accessToken= credentials.getAccessToken();
    }

When i press logout button i execute following code.

credentialsManager.clearCredentials();

This logs out the user, but it does not clear the session from chrome.
I have also added logout callback in Auth0 dashboard.

Is there any way i can clear the session from browser.

I am using auth0-1.41.1

implementation ‘com.auth0.android:auth0:1.14.1’
implementation ‘com.auth0.android:jwtdecode:1.2.0’

Hey there @Naofilms, can you snag us a HAR file when replicating this stated above work flow and DM it over to me? This will allow us to take a closer look at what may be going on. Thank you in advance!

I wanted to touchbase with you @Naofilms and see if you have any additional questions on this subject. I’m happy to take a look but the next step would be getting us a HAR file capture of the posed workflow. Thanks!

Thank you so much @James.Morrison. My issue got fixed.

1 Like

I’m glad to hear it all worked out! Keep us posted as your build progresses and if you have any questions in the future :+1:

Thanks, i have posted another question. It would be great if you can help in that.

Fantastic, I made a response to your post. I’m happy to work with you there on getting that question answered as well.