ios - ADAL iOS 重定向 URI 必须是 http(s)?

标签 ios adal

我正在努力使用最新版本的 ADALiOS 库 (2.2.5) 在我的 iOS 应用程序(Xcode 8,在 iOS 10 上运行)中运行 ADAL 身份验证,并根据 documentation 配置了 authContext ,但我收到以下错误:

AADSTS50011: Reply address 'x-msauth-<appname>://<app bundle id>/' 
specified by the request is not a valid URL. Allowed schemes: 'http, https'

此错误消息直接与 documentation 冲突它明确要求重定向 URI 是 iOS 应用程序 URL,而不是 Web URL:

Redirect URI

This adds extra requirements on your redirect URI. Your redirect URI must be in the proper form.

<app-scheme>://<your.bundle.id>
ex: x-msauth-mytestiosapp://com.microsoft.mytestiosapp

This Redirect URI needs to be registered on the app portal as a valid redirect URI. Additionally a second "msauth" form needs to be registered to handle certificate authentication in Azure Authenticator.

msauth://code/<broker-redirect-uri-in-url-encoded-form>
ex: msauth://code/x-msauth-mytestiosapp%3A%2F%2Fcom.microsoft.mytestiosapp

Azure 门户中是否缺少允许非 HTTP 重定向 URL 的配置?这是 ADALiOS 库中的错误吗?

还有,编码后的Redirect URI需要在​​哪里注册呢?在 iOS 应用程序的 .plist 中?在 Azure 门户中?两个?

最佳答案

您必须尝试将该应用程序注册为 Web 应用程序。您需要在目录中创建一个新应用程序作为 Native Client Application:

Native Client Application

关于ios - ADAL iOS 重定向 URI 必须是 http(s)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39601909/

相关文章:

iphone - iPhone中的NSData到NSArray错误

c# - 如何使用 ADAL/OpenId 获取 azure AAD 中的当前用户?

c# - 如何使用登录用户的 AccessToken 实例化 Microsoft GraphClient?

ios - Mailgun:使用解析云代码发送图像

ios - 表的Firebase查询

node.js - CompactToken 解析失败,错误代码 : 80049217 when using passport library to access Microsoft Graph API

java - 用于访问 token 的 ADAL java 库不返回组和角色

javascript - promisify 来自 adal-node 的 acquireTokenWithClientCredentials 函数

ios - 对象动画 - c4framework

android - 最小化数据库的值(value)