react-native-google-sign-in
react-native-google-sign-in copied to clipboard
How do I know if a user is already logged in when my app starts?
Hi I don't want to force the user to log in each time my (Android) App starts. Basically my App offers Facebook and Google Login the first time it starts. Once the user logged in with Facebook or Google the app should remember this. Next time the user starts my app he should be already logged in.
The react-native-facebook-login calls an onLoginFound callback which tells my app if the user is already logged in to my app.
How do I achieve the same with react-native-google-sign-in ?
@stami
@BerndWessels You may want to see https://github.com/joonhocho/react-native-google-sign-in/blob/master/js/GoogleSignIn.ios.js for all supported APIs. See GoogleSignIn.android.jos as well if you are using Android.
What should i prefer, if I am not using google and facebook authentication. I am using my own database using login API. Can you please suggest how to maintain the session?