diff --git a/README.md b/README.md index 1f91b80..76eeca4 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ No application is perfect from the beginning. With over a dozen coming articles, 1. [**Too modern Go application? Building a serverless application with Google Cloud Run and Firebase**](https://threedots.tech/post/serverless-cloud-run-firebase-modern-go-application/?utm_source=github.com) 2. [**A complete Terraform setup of a serverless application on Google Cloud Run and Firebase**](https://threedots.tech/post/complete-setup-of-serverless-application/?utm_source=github.com) 3. [**Robust gRPC communication on Google Cloud Run (but not only!)**](https://threedots.tech/post/robust-grpc-google-cloud-run/?utm_source=github.com) +3. [**You should not build your own authentication. Let Firebase do it for you.**](https://threedots.tech/post/firebase-cloud-run-authentication/?utm_source=github.com) 4. *More articles are on the way!* ### Directories diff --git a/internal/common/server/http.go b/internal/common/server/http.go index 52f1ae0..4726f09 100644 --- a/internal/common/server/http.go +++ b/internal/common/server/http.go @@ -54,7 +54,7 @@ func addAuthMiddleware(router *chi.Mux) { var opts []option.ClientOption if file := os.Getenv("SERVICE_ACCOUNT_FILE"); file != "" { - opts = append(opts, option.WithCredentialsFile("/service-account-file.json")) + opts = append(opts, option.WithCredentialsFile(file)) } config := &firebase.Config{ProjectID: os.Getenv("GCP_PROJECT")} diff --git a/internal/users/fixtures.go b/internal/users/fixtures.go index 7913508..29853ab 100644 --- a/internal/users/fixtures.go +++ b/internal/users/fixtures.go @@ -63,7 +63,7 @@ func createFirebaseUsers() ([]string, error) { var opts []option.ClientOption if file := os.Getenv("SERVICE_ACCOUNT_FILE"); file != "" { - opts = append(opts, option.WithCredentialsFile("/service-account-file.json")) + opts = append(opts, option.WithCredentialsFile(file)) } config := &firebase.Config{ProjectID: os.Getenv("GCP_PROJECT")}