Gets Firebase auth tokens (for development purposes only)
- Create Firebase project
- Setup Firebase authentication
- Setup Google IDP
- Create "Web" application for Firebase
- Navigate to Web application credentials in GoogleCloud:
API & Services > Credentials > Web Client
- Add localhost to "Authorized redirect URIs"
e.g. http://localhost:5000/__/auth/handler
- Download JSON
- Ensure Firebase service account exists in Firebase:
Project Settings > Service Accounts > Create Service Account (if doesn't already exist)
- Copy Firebase Admin APIKey in GoogleCloud:
API & Services > Credentials > API Keys > the one which says (auto created by Firebase)
- Get tokens
go run main.go --apiKey xyz123 --config ~/Downloads/yourfirebasewebappconfig.json
go install github.com/mousybusiness/firebase_token
then simply firebase_token --help
go run main.go --apiKey xyz123 --config ~/Downloads/yourfirebasewebappconfig.json --refresh YOUR_REFRESH_TOKEN
go run main.go --apiKey xyz123 --config ~/Downloads/yourfirebasewebappconfig.json --refresh YOUR_REFRESH_TOKEN --token
LOG_LEVEL=debug go run main.go ...