hussein shaib
hussein shaib

Reputation: 108

unable to get refresh token from FirebaseAuth in xamarin android

I am trying to sign in with google using

IAuthResult user = await FirebaseAuth.Instance.SignInWithCredentialAsync(credential as AuthCredential);

then I can get the idToken using

var token = user.User.GetIdToken(false);

but there is no way to get the refresh token to store it in order to check if it is valid or not. Any suggestion?

Upvotes: 0

Views: 672

Answers (1)

xerx
xerx

Reputation: 119

You don't actually need to use the refresh token yourself. This is handled behind the scenes from the Firebase SDK so you will remain connected so long as you do not sign out. The tokes expire after one hour but they will be automatically refreshed. You can revoke a refresh token using the Admin SDK. https://firebase.google.com/docs/auth/admin/manage-sessions

Upvotes: 1

Related Questions