Expo.Google.logInAsync - force to login as certain user


#1

I want to get access to some of the user’s resources after the user was logged in. To do this, I execute Expo.Google.logInAsync method with a scope which corresponds with the needed resources. Is it possible to force the user to login (second time) via google account on which he/she is currently login into the app?


#2

Hey @trojek,

You could store the credential via AsyncStorage and fetch them during AppLoading.

Cheers,

Adam


#3

Hey @adamjnav,

I do as you suggest, but it isn’t a case of my problem. I know which user is currently login into my app, but I want to make another sign in only for already signined users (to get access to data), and I want to force Google to sign in only for certain (already logged in) user.

Cheers,
Tomek


#4

I’m not exactly sure I understand the situation here, but presenting an already authenticated/signed-in user another sign in prompt seems like a bad practice. If you successfully get an access token, you should be able to re-use that to fetch data from Google subsequently rather than having users “sign in” again.


#5

I ask about different permissions in each login. I’m sure that you see this kind of request, e.g. if you want to change the password in some service and you are already logged in you have to do it (login in) one more time.

I think that my question is related to Google API then to Expo.


closed #6

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.