我有一个使用xCode/Swift开发的本地iOS应用程序,该应用程序集成了 Firebase身份验证用于注册和登录新用户的SDK. Firebase Auth系统应链接到 Azure Active Directory B2C 这样:
I have a native iOS application developed in xCode/Swift that integrates the Firebase Auth SDK for registering and login of new users. The Firebase Auth system should be linked to an Azure Active Directory B2C so that:
- 已创建的新用户同时存在于Firebase身份验证和Azure AD B2C中(我猜是否具有相同的凭据?)
- 用户登录时,他/她都在Firebase Auth和Azure AD B2C上下文中登录,因此可以在两个平台上进行安全调用
- 在Azure AD B2C或firebase Auth上删除用户时,也应该在其他平台上删除用户. 为此,我可以使用在Auth事件上触发的Firebase函数与Azure AD B2C进行同步.对于将Azure AD B2C返回Firebase Auth,我还可以预见一个可以被Azure AD B2C调用的Firebase函数确实会删除用户.
经过研究,我发现Firebase支持自定义令牌"(请参阅 firebase.google/docs/auth/admin/create-custom-tokens ). 这可以提供解决方案吗?我看不到关于创建新用户的任何信息,仅是身份验证...
After doing research I found that Firebase supports "custom tokens" (refer to firebase.google/docs/auth/admin/create-custom-tokens). Could this offer a solution? I do not see anything about creating new users, only authentication...
推荐答案我和我的团队针对自定义令牌开发了针对此确切方案的解决方案.我们的实施自几个月以来一直在Azure上运行,现在我们还没有出现任何问题.
Me and me team developed a solution for this exact scenario around custom tokens. Our implementation run since a couple of months on Azure and we had no problem at all yet.
以下是流程:
注意:
此外,好处是您不必在Firebase中维护用户,因为您无需创建Firebase用户,而只需使用自定义令牌即可,因此无需删除用户.
Also, the good thing is that you don't have to maintain users in Firebase since you don't create Firebase users and only use a custom token so no need to delete users.
更多推荐
使用Azure AD B2C进行Firebase身份验证
发布评论