This example shows how to use Firebase Auth for a golang server.
- Create a Firebase project using the Firebase Developer Console.
- Enable the Email/Password sign-in provider in the Authentication > SIGN-IN METHOD tab.
- Download a service account from the Firebase Console (Settings > Service Accounts) and set the environment variable
GOOGLE_APPLICATION_CREDENTIALS
to the path to the downloaded service account credentials file. - Add your
FIREBASE_API_KEY
key in .env file - Run
go run main.go
to start the server. - Visit
http://localhost:8080
to view the sample.