Skip to content

Instantly share code, notes, and snippets.

@nidhi-canopas
Created March 9, 2022 17:58
Show Gist options
  • Save nidhi-canopas/be394b41aba4115d3bc17dc60f4ff23d to your computer and use it in GitHub Desktop.
Save nidhi-canopas/be394b41aba4115d3bc17dc60f4ff23d to your computer and use it in GitHub Desktop.
decodedKey, err := getDecodedFireBaseKey()
if err != nil {
return err
}
opts := []option.ClientOption{option.WithCredentialsJSON(decodedKey)}
// Initialize firebase app
app, err := firebase.NewApp(context.Background(), nil, opts...)
if err != nil {
log.Debug("Error in initializing firebase app: %s", err)
return err
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment