Is it possible to use additional providers for firebase authentication?

一笑奈何 提交于 2021-02-11 13:51:00

问题


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:

  1. 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.
  2. You pass the credentials to a custom trusted endpoint that you create and host, on a server that you control, or on Cloud Functions.
  3. In this custom backend, you check the credentials, and then use the Firebase Admin SDK to mint a custom token for the user.
  4. You return this custom token from the backend to the application.
  5. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!