Select a different account for login - react-native

Hi there,
I am building a react-native app that uses external auth0 login. My problem is:
if the user is already logged into their personal account on their phone (android, therefore - google account. even though I assume it might be the same with apple), they can only log in with that same account into my app as well, which is awful UX. I want them to be able to choose between different google accounts (or any other). How can I achieve that?

Hey @daskalovia, Welcome to Auth0 Community!

Depending on the IDP there can be parameters which can be configured in the /authorize request to allow choosing the account. In case of google as IDP you can try using prompt='select_account' query parameter in the /authorize request to force selecting an account.

Let me know if this helps!

Nope. Found a solution, but wasn’t that. I added prompt: ‘login’. Full code:
const credentials = await auth0.webAuth.authorize({
scope: ‘openid profile email’,
extra_params: JSON.stringify(params),
audience: Config.REACT_APP_AUDIENCE,
prompt: ‘login’,
});

1 Like

Great! Glad to hear that!