Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Impara Configuring Social Providers in Firebase | Email and Social Authentication
Firebase Authentication in React Apps

bookConfiguring 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.

question mark

Which of the following is a required step to enable GitHub authentication in Firebase?

Select the correct answer

Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 2. Capitolo 3

Chieda ad AI

expand

Chieda ad AI

ChatGPT

Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione

Suggested prompts:

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?

bookConfiguring Social Providers in Firebase

Scorri per mostrare il 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.

question mark

Which of the following is a required step to enable GitHub authentication in Firebase?

Select the correct answer

Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 2. Capitolo 3
some-alt