Add Google Authentication to Azure AD B2C in public web forms

Follow this instruction for Google Identity Provider — you’ll first need to create a new project in Google Developers Console:

Google New project

In the left menu, select APIs and services and then OAuth consent screen. Select External and then select Create:

  1. Enter a Name for your application.

  2. Select a User support email.

  3. In the App domain section, enter a link to your home page, a link to your privacy policy, and a link to your terms of service.

  4. In the Authorized domains section, enter b2clogin.com.

  5. In the Developer contact information section, enter comma separated emails for Google to notify you about any changes to your project.

  6. Select Save.

Google New project

Select Credentials in the left menu, and then select Create credentials > Oauth client ID:

  1. Under Application type, select Web application.

  2. Enter a Name for your application.

  3. For the Authorized JavaScript origins, enter https://your-tenant-name.b2clogin.com.

    If you use a custom domain, enter https://your-domain-name.

  4. For the Authorized redirect URIs, enter https://your-tenant-name.b2clogin.com/your-tenant-name.onmicrosoft.com/oauth2/authresp. If you use a custom domain, enter https://your-domain-name/your-tenant-name.onmicrosoft.com/oauth2/authresp. Replace your-domain-name` with your custom domain, and your-tenant-name` with the name of your tenant.

    Use all lowercase letters when entering your tenant name even if the tenant is defined with uppercase letters in Azure AD B2C.

  5. Click Create.

Google credentials

Copy the values of Client ID and Client Secret and paste them to Google Identity provider in Azure AD B2C:

Google Config

After setting it up, you can add it as an Identity provider to the sign up and sign in flow that you’ve created:

Identity providers

Then, your form users will be able to select Google as sign in platform:

Google sign in