使用Azure AD B2C进行Firebase身份验证 [英] Firebase Authentication with Azure AD B2C

查看:94
本文介绍了使用Azure AD B2C进行Firebase身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用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支持自定义令牌"(请参阅​​

After doing research I found that Firebase supports "custom tokens" (refer to https://firebase.google.com/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.

以下是流程:

注意:

  1. Azure B2C可以用任何STS代替.
  2. Azure功能可以由任何后端进程替换.


此外,好处是您不必在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身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆