Search code examples
firebasegofirebase-authenticationfirebase-admin

Is there a lighter version of the firebase admin SDK that only includes the auth package for Go?


I have the whole firebase.google.com/go/v4 library as a dependency just to be able to do the following:

client *auth.Client
client.VerifyIDToken(ctx, bearerToken)

Is there a lighter version of the firebase library that only includes the auth package? Or better yet, that just does firebase ID token validation.


Solution

  • There is only one version of the Firebase Admin SDK for Go, and it contains clients for all Firebase features the SDK supports. Unlike with the client-side SDKs, there are no separate Admin SDKs for individual Firebase features.

    If you don't want to use the Admin SDK for Go, you can:

    • write your code to directly talk against the REST API.
    • take the code of the SDK and see if you can build a stripped down version that only includes what you need.