Configuring Social Providers in Firebase
To allow users to sign in to your React app using Google or GitHub, you must first configure these providers in the Firebase Console. Begin by opening your Firebase project and navigating to the Authentication section in the left sidebar. Select the Sign-in method tab. Here, you will see a list of available sign-in providers, including Google and GitHub.
To enable Google authentication:
- Click on the Google provider;
- In the dialog that appears, switch the Enable toggle to active;
- Provide a project support email, usually your own Google account;
- Save your changes. Google sign-in will now be available for your app.
To enable GitHub authentication:
- Click on the GitHub provider;
- Notice that enabling GitHub requires a Client ID and Client Secret;
- Obtain these credentials from your GitHub Developer settings by creating a new OAuth App;
- Set the Authorization callback URL to the value shown in the Firebase configuration dialog (formatted as
https://<your-project-id>.firebaseapp.com/__/auth/handler); - After creating the app, copy the Client ID and Client Secret;
- Enter these values into the respective fields in the Firebase Console's GitHub provider configuration;
- Save your changes. GitHub sign-in will now be enabled for your app.
To get the required OAuth credentials for Google and GitHub, follow these steps. For Google, the Firebase Console manages the OAuth credentials for you, so you do not need to manually obtain or enter a Client ID and Client Secret. For GitHub, however, you must visit the GitHub Developer settings and create a new OAuth App. Set the Authorization callback URL to the value shown in the Firebase configuration dialog (it will look like https://<your-project-id>.firebaseapp.com/__/auth/handler). Once the app is created, GitHub will provide you with a Client ID and Client Secret. Copy these values and enter them into the respective fields in the Firebase Console's GitHub provider configuration. After saving, GitHub sign-in will be enabled for your app.
Thanks for your feedback!
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Can you explain how to create a new OAuth App in GitHub step by step?
What should I do if I don't see the Google or GitHub provider in the Firebase Console?
Is there anything else I need to configure in my React app after enabling these providers in Firebase?
Awesome!
Completion rate improved to 9.09
Configuring Social Providers in Firebase
Swipe to show menu
To allow users to sign in to your React app using Google or GitHub, you must first configure these providers in the Firebase Console. Begin by opening your Firebase project and navigating to the Authentication section in the left sidebar. Select the Sign-in method tab. Here, you will see a list of available sign-in providers, including Google and GitHub.
To enable Google authentication:
- Click on the Google provider;
- In the dialog that appears, switch the Enable toggle to active;
- Provide a project support email, usually your own Google account;
- Save your changes. Google sign-in will now be available for your app.
To enable GitHub authentication:
- Click on the GitHub provider;
- Notice that enabling GitHub requires a Client ID and Client Secret;
- Obtain these credentials from your GitHub Developer settings by creating a new OAuth App;
- Set the Authorization callback URL to the value shown in the Firebase configuration dialog (formatted as
https://<your-project-id>.firebaseapp.com/__/auth/handler); - After creating the app, copy the Client ID and Client Secret;
- Enter these values into the respective fields in the Firebase Console's GitHub provider configuration;
- Save your changes. GitHub sign-in will now be enabled for your app.
To get the required OAuth credentials for Google and GitHub, follow these steps. For Google, the Firebase Console manages the OAuth credentials for you, so you do not need to manually obtain or enter a Client ID and Client Secret. For GitHub, however, you must visit the GitHub Developer settings and create a new OAuth App. Set the Authorization callback URL to the value shown in the Firebase configuration dialog (it will look like https://<your-project-id>.firebaseapp.com/__/auth/handler). Once the app is created, GitHub will provide you with a Client ID and Client Secret. Copy these values and enter them into the respective fields in the Firebase Console's GitHub provider configuration. After saving, GitHub sign-in will be enabled for your app.
Thanks for your feedback!