azure - 为 VueJs 前端和 Azure 函数应用程序后端实现身份验证/授权的最佳方法是什么
问题描述
我正在构建一个系统,该系统由使用 VueJs 的前端 SPA 构建组成,后端由一组 Azure 函数 (C#) 组成。我已经完成了原型,我正在向应用程序添加用户身份验证/授权功能。该应用程序是 B2B,因此无需外部身份提供者,也无需注册。所有用户都将由系统管理员创建。我有多种选择:
- 自己开发认证/授权/用户管理。
- 使用 Azure AD B2C
- 使用 Auth0 服务
我之前没有使用过#2 和#3。我需要帮助来选择更适合我需要的选项。或者也许有更好的选择。
解决方案
Regarding (2), it seems you don't need to use Azure AD B2C, given that you will not authenticate with external identities. A better alternative is to create a multi-tenant SaaS application and offer it to other Azure AD tenants of your choice (even the free tier might cover your needs). For your Vue.js client, you can leverage MSAL.js and you can use Microsoft.Identity.Web to protect your Azure Function app
Have a look at these code samples.
推荐阅读
- c# - 如何截取完整的桌面Windows c#
- abap - 在 SALV 类中使用没有转换出口的输出
- excel - 将范围复制并粘贴到下一个可用列中
- text - 从复制的文本中删除除可见字符之外的所有字符(不可见的控制字符破坏代码)
- blazor-server-side - JSRuntime.InvokeAsync("open", ...) 抛出 TaskCanceledException
- google-cloud-platform - 为什么在数据融合中运行数据管道时没有配置它?
- regex - 正则表达式查找具有两个匹配相同正则表达式但仍然不同的捕获组的行
- xcode - 将环境变量传递给 XCode 构建
- javascript - Selenium WebDriver 等待 javascript 生成的表正在加载/可见
- python - Python 正则表达式 - 组