ios - 我将在哪里获得用于实现 Azure B2c 身份验证的 kGraphURI 和 kScopes

标签 ios swift azure-active-directory azure-ad-b2c

我需要为我的应用程序实现 B2C 登录和注册。我已使用以下链接从 GitHub 下载了代码。 https://github.com/Azure-Samples/active-directory-b2c-ios-swift-native-msal

这表明我需要一些常量来配置。

let kTenantName = "<tenant>.onmicrosoft.com" // Your tenant name
let kClientID = "<your-client-id>" // Your client ID from the portal when you created your application
let kSignupOrSigninPolicy = "<your-signin-policy>" // Your signup and sign-in policy you created in the portal
let kEditProfilePolicy = "<your-edit-profile-policy>" // Your edit policy you created in the portal
let kGraphURI = "<Your backend API>" // This is your backend API that you've configured to accept your app's tokens
let kScopes: [String] = ["<Your backend API>/demo.read"] // This is a scope that you've configured your backend API to look for.

现在我从哪里可以获得 kGraphURI 和 kScopes ?

最佳答案

对于此示例,您需要在 Azure B2C 应用程序中注册 Natvie App 和 Web API。

后端API是指在B2C应用程序中注册的WebApp/API。

kGraphURI = "<Your backend API>" // This is the App ID URI of Web API in the AAD B2C application.

kScopes: [String] = ["<Your backend API>/demo.read"] // This is a scope value which you configured for the Web API in the AAD B2C applicaiton.

例如:

kGraphURI = "https://fabrikamb2c.onmicrosoft.com/example"

kScopes: [String] = ["https://fabrikamb2c.onmicrosoft.com/example/demo.read"]

关于ios - 我将在哪里获得用于实现 Azure B2c 身份验证的 kGraphURI 和 kScopes,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50526270/

相关文章:

.net - Azure AD 异常 Microsoft.Identity.Client.MsalServiceException : The provided value for the input parameter 'scope' is not valid

iPhone 崩溃报告框架

iphone - 图片丢失时 FB 提要对话框中没有信息

ios - 显示带有选定行的 UIPickerView

ios - 如何使用缩放和平移为 MapView 添加自定义平面图

Azure函数代表用户调用服务

ios - 如何使用与原始数据不同的数据重新加载 TableView ?

ios - 如何实现SKActionTimingFunction?

ios - 如何用文本填充标签直到达到其宽度

authentication - 如何使用 java 脚本后端在 AAD 单点登录中使用访问 token 获取登录的用户详细信息(用户电子邮件 ID 和用户名)?