P粉9880258352023-09-06 10:29:08
As doc, "You can allow users to log in to your app using multiple authentication providers by linking the authentication provider credentials to existing user accounts. Regardless of authentication, Users are identified by the same Firebase user ID as the provider they used to log in." See also the linkWithCredential()
的文档a> and linkWithPhoneNumber()
methods.
You can use custom claims based on <的基于角色的访问控制策略/a> (you can add multiple claims, one per role) or Firestore documentation . However, you will implement the mechanism for user selection of roles (you mentioned "different registration forms" in your question) and the corresponding GUI display yourself in your application.