2

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?

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

2 Comments

I wanted to avoid the need for a server to generate JWT tokens, I was hoping for a .NET library that could authenticate via Google like the Firebase Javascript library does.
Although Firebase doesn't provide such a library, there are probably .NET OAuth clients out there. After you use one of those to authenticate the user, you can still mint a JWT based on the information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.