How to connect with mobile application to AD B2C(如何将移动应用程序连接到 AD B2C)
问题描述
我在 .net core (3.1) 中有一个 web api.
I' ve a web api in .net core (3.1).
这个网站被 3 个应用程序使用:
This web is used by 3 applications :
- 网络应用程序
- iOS 应用
- 安卓应用
对于 Web 应用程序,我们使用默认登录页面.所以登录后会有一个重定向到客户端应用程序.
For the Web Application we use the default login page. so after login there is a redirect to the client application.
对于 Ios 和 Android 应用,我们无法找到可用于获取令牌的代码.
For Ios and Android Apps we are not able to find a code that worked in order to get the token.
谢谢.
推荐答案
关于如何获取 azure ad token 调用 api 的示例有很多.请看这里:https://docs.microsoft.com/en-us/azure/active-directory-b2c/code-samples
there are various samples of how to get azure ad tokens to call apis. please take a look here: https://docs.microsoft.com/en-us/azure/active-directory-b2c/code-samples
特别注意前2个:ios-swift-native-msal和android-native-msal他们基本上就是这样做的,使用 MSAL 库来获取令牌并允许您使用它来调用 Web api.
pay particular attention to the first 2: ios-swift-native-msal and android-native-msal they basically do exactly that, with the MSAL library to get tokens and allow you to use it to call web apis.
这篇关于如何将移动应用程序连接到 AD B2C的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何将移动应用程序连接到 AD B2C
基础教程推荐
- 将数据集转换为列表 2022-01-01
- C# 9 新特性——record的相关总结 2023-04-03
- 从 C# 控制相机设备 2022-01-01
- 重新排序 WPF TabControl 中的选项卡 2022-01-01
- 更新 Visual Studio 中的 DataSet 结构以匹配新的 SQL 数据库结构 2022-01-01
- SonarQube C# 分析失败“不是指针的有效行偏移" 2022-01-01
- 在 VB6 或经典 ASP 中使用 .NET 2022-01-01
- 如果条件可以为空 2022-01-01
- 获取C#保存对话框的文件路径 2022-01-01
- Mono https webrequest 失败并显示“身份验证或解密失败" 2022-01-01
