React Native Okta: Chrome custom tab auto-logs in with previous IdP (can't switch accounts)

Hello!

I have a React Native app using the okta-react-native package. When a user logs in on an Android device using Google as a identity provider

const { access_token } = await signInWithBrowser({
  idp: idpId,
  noSSO: true,
});

and logs out again:

logout: async () => {
  await okta.signOut();
},

and than wants to log in again using a different identity provider like Facebook, the Chrome custom tab opens, but it immediately closes and I get logged in using the Google account I used earlier. This locks the app to that account without a way to switch to a different account the user might have.

The behavior also survives clearing the app data. Only clearing the Chrome data prevents the automatic login.

I tried to send prompt=’login’ in the hopes that the user has to re-login again without success. I also tried to clear cookies programmatically without success.

Is there a way, when the user logs out, that he/she has to re-login in the Chrome custom tab?

Thanks for your help!

Hi,

The behaviour you see sounds pretty much like this - Okta Help Center (Lightning)

The IDP session is still active even if you log out of Okta, so the next time you try to sign in, you will sign in with the previous user.

I believe clearing Chrome custom tab data is clearing session-related data of the IDP, so it’ll work the next time another user tries to sign in.