Skip to content

Commit

Permalink
Add "You should not build your own authentication. Let Firebase do it…
Browse files Browse the repository at this point in the history
… for you"
  • Loading branch information
roblaszczak committed Jun 3, 2020
1 parent f75f28f commit b7ce689
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion internal/common/server/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")}
Expand Down
2 changes: 1 addition & 1 deletion internal/users/fixtures.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")}
Expand Down

0 comments on commit b7ce689

Please sign in to comment.