Home > Software engineering >  If anyone take my Google Sign in token, can he or she sign in via that access token?
If anyone take my Google Sign in token, can he or she sign in via that access token?

Time:01-29

I am learning react-js development, from this course I learned that I can use Firebase and Google sign as a third part storage service and sign in verification service, I draw a sign in steps with drawio diagram, as diagram below if someone take my (2) Google verification token or (6) Firebase access token can he or she sign in my website on his machine by that two tokens before expired ?

enter image description here

clarification about google token or firebase token security level.

CodePudding user response:

That's a pretty standard OAuth flow. Firebase JS SDK does the same under the hood when you call signInWithPopup():

  1. Getting user's access token after user's approval
  2. Signing in with the response (see sign in with OAuth credential)

Yes, if I somehow get your Google Access Token (2), I can use it to access your account's data (for the scopes it has access to). Similarly, Firebase tokens are generally used as a Bearer token that means anyone in possession of the token gets access to the resources.

But chances of someone getting these tokens are slim to none (unless they have physical access to user's computer). As long as users do not share these tokens or any malicious script tries to read them, this flow has no issues.

  • Related