使用 Firebase React-Native 的 Microsoft 身份验证

Microsoft authentification with Firebase React-Native

我目前正在实施与 Microsoft 的 Firebase React Native 连接。但是 https://rnfirebase.io/auth/social-auth , there is no section on Microsoft. I searched the documentation https://firebase.google.com/docs/auth/android/microsoft-oauth 但是我觉得很难理解。我只是想建立联系,没有别的。

您可以使用 Firebase React Native 应用程序与 Microsoft Azure AD 建立连接。

请按照以下步骤实施。

To sign in users using Microsoft accounts (Azure Active Directory and personal Microsoft accounts), you must first enable Microsoft as a sign-in provider for your Firebase project:

  1. Add Firebase to your Android project.

  2. In the Firebase console, open the Auth section.

  3. On the Sign in method tab, enable the Microsoft provider.

  4. Add the Client ID and Client Secret from that provider's developer console to the provider configuration:

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

  6. When registering apps with these providers, be sure to register the *.firebaseapp.com domain for your project as the redirect domain for your app.

  7. Click Save.

  8. If you haven't yet specified your app's SHA-1 fingerprint, do so from the Settings page of the Firebase console. Refer to Authenticating Your Client for details on how to get your app's SHA-1 fingerprint.

Reference: Authenticate Using Microsoft on Android | Firebase Documentation (google.com)

您还可以参考此文档以获得更多说明:https://medium.com/seed-digital/using-microsoft-azure-identity-with-firebase-in-a-react-native-app-c9eef0fd0af8