Fixer OAuth2.0 sign-in method for Firebase project
When we manual delete credential from 'GCP > APIs & Services > OAuth 2.0 Client IDs'.
But isn't init provider from 'Firebase > Authentication > Sign-in method' yet.
- Example URL: https://console.firebase.google.com/u/0/project/praneat-internal/authentication/providers
If you need to add provider to Firebase Authentication, you will encounter initialize problem, Firebase alway recognize old OAuth 2.0 client credential.
So we need to manual provisioning OAuth2.0 IdP by ourself via Default Supported Idp Configs Google API.
- Install Node.js runtime into your local machine https://nodejs.org/en/download/
- Download service account key into ./secret folder
- Config .env file
- PROJECT_ID
- Is GCP / Firebase Project ID
- IDP_ID
- Is provider that you need to manual provision
- Provider list
- CLIENT_ID
- Is OAuth 2.0 client id
- Copy it from 'GCP > APIs & Services > OAuth 2.0 Client IDs > [Client Platform]'
- CLIENT_SECRET
- Is OAuth 2.0 client secret
- Copy it from 'GCP > APIs & Services > OAuth 2.0 Client IDs > [Client Platform]'
- SERVICE_ACCOUNT_FILE
- Is service account file name that downloaded from Configuration step 1.)
- PROJECT_ID
yarn start