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’