简体   繁体   中英

Use Google authentication token with Firebase

I have a .NET application (not a web app) where users are already authenticated by Google Authorization, and therefore a token has been issued.

I'd like this application to store user data to Firebase with a user read-write security rule of type: "$user_id === auth.uid".

Since you may authenticate to Firebase with Google, is there a way that the application would pass to Firebase an already Google issued token?

The Firebase REST API only takes Firebase JWT tokens. You can take the information from the Google token and mint a JWT from it, using one of the libraries Firebase provides for the purpose.

This is covered in the User Authentication section of the Firebase documentation .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM