Skip to main content

Enable Other Login Services for Authentication

Last Updated: 25 Sep 2024
Apple

Join the Apple Developer Program

Sign In with Apple can only be configured by members of the Apple Developer Program.

Configure Sign In with Apple

  1. On the Apple Developer site, do the following:
    Associate your website with your app as described in the first section of Configure Sign In with Apple for the web. When prompted, register the following URL as a Return URL:

    https://YOUR_FIREBASE_PROJECT_ID.firebaseapp.com/__/auth/handler

    You can get your Firebase project ID on the Firebase console settings page.
    When you're done, take note of your new Service ID, which you'll need in the next section.

  2. Create a Sign In with Apple private key. You'll need your new private key and key ID in the next section.

  3. If you use any of Firebase Authentication's features that send emails to users, including email link sign-in, email address verification, account change revocation, and others, configure the Apple private email relay service and register noreply@YOUR_FIREBASE_PROJECT_ID.firebaseapp.com (or your customized email template domain) so Apple can relay emails sent by Firebase Authentication to anonymized Apple email addresses.

Enable Apple as a sign-in provider

In the Firebase console, open the Auth section. On the Sign in method tab, enable the Apple provider. Specify the Service ID you created in the previous section. Also, in the OAuth code flow configuration section, specify your Apple Team ID and the private key and key ID you created in the previous section.

Comply with Apple anonymized data requirements

Sign In with Apple gives users the option of anonymizing their data, including their email address, when signing in. Users who choose this option have email addresses with the domain privaterelay.appleid.com. When you use Sign In with Apple in your app, you must comply with any applicable developer policies or terms from Apple regarding these anonymized Apple IDs.

This includes obtaining any required user consent before you associate any directly identifying personal information with an anonymized Apple ID. When using Firebase Authentication, this may include the following actions:

  • Link an email address to an anonymized Apple ID or vice versa.
  • Link a phone number to an anonymized Apple ID or vice versa
  • Link a non-anonymous social credential (Facebook, Google, etc) to an anonymized Apple ID or vice versa. The above list is not exhaustive. Refer to the Apple Developer Program License Agreement in the Membership section of your developer account to make sure your app meets Apple's requirements.
Twitter
  1. In the Firebase console, open the Auth section.
  2. On the Sign in method tab, enable the Twitter provider.
  3. Add the API key and API secret from that provider's developer console to the provider configuration:
    • Register your app as a developer application on Twitter and get your app's OAuth API key and API secret.
    • Make sure your Firebase OAuth redirect URI (e.g. my-app-12345.firebaseapp.com/__/auth/handler) is set as your Authorization callback URL in your app's settings page on your Twitter app's config.
  4. Click Save.
Github
  1. In the Firebase console, open the Auth section.
  2. On the Sign in method tab, enable the GitHub provider.
  3. Add the Client ID and Client Secret from that provider's developer console to the provider configuration:
    • Register your app as a developer application on GitHub and get your app's OAuth 2.0 Client ID and Client Secret.
    • Make sure your Firebase OAuth redirect URI (e.g. my-app-12345.firebaseapp.com/__/auth/handler) is set as your Authorization callback URL in your app's settings page on your GitHub app's config.
  4. Click Save.
Microsoft
  1. In the Firebase console, open the Auth section.
  2. On the Sign in method tab, enable the Microsoft provider.
  3. Add the Client ID and Client Secret from that provider's developer console to the provider configuration:
    • To register a Microsoft OAuth client, follow the instructions in Quickstart: Register an app with the Azure Active Directory v2.0 endpoint. Note that this endpoint supports sign-in using Microsoft personal accounts as well as Azure Active Directory accounts. Learn more about Azure Active Directory v2.0.
    • When registering apps with these providers, be sure to register the *.firebaseapp.com domain for your project as the redirect domain for your app.
  4. Click Save.
Yahoo
  1. In the Firebase console, open the Auth section.
  2. On the Sign in method tab, enable the Yahoo provider.
  3. Add the Client ID and Client Secret from that provider's developer console to the provider configuration:
    • To register a Yahoo OAuth client, follow the Yahoo developer documentation on registering a web application with Yahoo.
      Be sure to select the two OpenID Connect API permissions: profile and email.
    • When registering apps with these providers, be sure to register the *.firebaseapp.com domain for your project as the redirect domain for your app.
  4. Click Save.
Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 4.0 Attribution License.