firebase / firebase-admin-go

Firebase Admin Go SDK
Apache License 2.0
1.13k stars 242 forks source link

FR: support signInWithCustomToken method #452

Closed olegsu closed 3 years ago

olegsu commented 3 years ago

Hey, I am creating a Golang app that should run not in my environment, but the remote untrusted cluster. I want to generate a JTW custom token and pass it to the go client to be used there. Using the NodeJS it was easy for me using the signInWithCustomToken function as described here. Can you please support the same authentication method here? or to have some kind of workaround?

hiranya911 commented 3 years ago

We don't offer client authentication operations on Admin SDKs. For Golang you will have to use the REST API, and come up with something similar to this:

https://github.com/firebase/firebase-admin-go/blob/928b104e521ffc3d7de0319efe1553c31e85e13f/integration/auth/auth_test.go#L213-L242

Note that this requires an API key.