firebase / firebase-admin-go

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

FR: App Check Token Validation #483

Open bamnet opened 2 years ago

bamnet commented 2 years ago

Currently, App Check validation is only available with the NodeJS-based Admin SDK. This limits the ability to Verify App Check tokens from a custom backend to Node-compatible applications.

Go is a very popular language for writing custom backends. It would be helpful if the Firebase Admin Go SDK provided similar functionality to the NodeJS SDK for Go backend developers to verify app check tokens.

Off the cuff, I would find an interface like this helpful (inspired by the NodeJS interface):

client, err := app.AppCheck(ctx)

claims, err := client.VerifyToken(token)
lahirumaramba commented 2 years ago

Hi @bamnet, Thank you for the feature request! We do not have plans to add App Check support to Go SDK at the moment. I will keep this issue open so that we can track any updates in the future. We also accept contributions to the codebase so you are welcome to submit pull requests if you would like.

For now, please refer to this blog post (see Verifying App Check tokens in other backend resources) for the recommended way to secure your non Node.js custom backend.

bamnet commented 2 years ago

Thanks for the update! Hearing it's not on your radar, I'll send a pull request soon that implements the logic in that blogpost.