问题
Apart from the existing providers, is it possible to use an additional provider for firebase
authentication? I am using Flutter
. Any detail explanation will be highly appreciated.
回答1:
You can indeed create a custom provider for Firebase Authentication. The process on Flutter is mostly the same as on other platforms:
- You sign the user in the custom backend or provider, and get credentials from that. This step is not related to Firebase in any way.
- You pass the credentials to a custom trusted endpoint that you create and host, on a server that you control, or on Cloud Functions.
- In this custom backend, you check the credentials, and then use the Firebase Admin SDK to mint a custom token for the user.
- You return this custom token from the backend to the application.
- The client then uses the custom token to sign in with Firebase.
来源:https://stackoverflow.com/questions/61156964/is-it-possible-to-use-additional-providers-for-firebase-authentication