Skip to content

cartier31038/firebase-oauth-fixer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Firebase OAuth2.0 Fixer

Status License


Fixer OAuth2.0 sign-in method for Firebase project

🧐 About

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.

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.


🏁 Getting Started

Prerequisites

  1. Install Node.js runtime into your local machine https://nodejs.org/en/download/

Configuration

  1. Download service account key into ./secret folder
  2. Config .env file
    1. PROJECT_ID
      • Is GCP / Firebase Project ID
    2. IDP_ID
    3. CLIENT_ID
      • Is OAuth 2.0 client id
      • Copy it from 'GCP > APIs & Services > OAuth 2.0 Client IDs > [Client Platform]'
    4. CLIENT_SECRET
      • Is OAuth 2.0 client secret
      • Copy it from 'GCP > APIs & Services > OAuth 2.0 Client IDs > [Client Platform]'
    5. SERVICE_ACCOUNT_FILE
      • Is service account file name that downloaded from Configuration step 1.)

Running fixer

yarn start

🎉 References

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published