Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16552

How to switch account using GoogleSignIn without sign out?

$
0
0

I am building mobile application with google sign in button. I want to show auth popup everytime I need without signing out before. So user can change his account to another one OR if he changes his mind to switch account when popup is shown he taps back and stays logged in to the previous account.

Right now the behaviour is following:

If user is logged in and he wants to change account, he has to sign out first, because popup is not shown when user already logged in. But I need to give users the possibility to stay logged in when popup is shown again. So they can change their mind and come back and still use services with valid tokens.

I am using React-Native, but solutions for native iOS or Android code would be still ok because RN uses native SDKs under the hood, so I would change native code for both platforms anyway.

Example of flow:

Youtube mobile application. If you're already logged in, you can open settings, tap "Change account" button, see google auth popup (although you're logged in still!), tap "cancel" or back button if you're under Android, continue use app under the user's account.


Viewing all articles
Browse latest Browse all 16552

Trending Articles