OAuth 2 流程上的 iOS 9 WKWebView didReceiveAuthenticationChallenge

标签 ios oauth

我一直很高兴地使用 WKWebView 来处理 iOS 8.x 中的 Instagram OAuth 隐式流程。但是,在 iOS 9 中,我的 WKWebView navigationDelegate 正在接收“didReciveAuthenticationChallenge”调用,我不知道如何处理它。

我已经尝试使用所有 4 种 NSURLSessionAuthChallengeDisposition 类型(所有 NSURLCredential 都为 nil)调用 completionHandler,但它们都不起作用。导航刚刚结束。

在 iOS 8 中,我没有收到这个电话,导航按预期进行到 Instagram 登录页面。

还有其他人找到解决方案吗?

最佳答案

因此,我通过在 plist.info 中设置 NSAllowsArbitraryLoads 解决了这个问题。这不是一个安全的修复方法,但由于(暂时)该应用程序控制着它访问的两个非常知名的网站,所以它应该足够安全。 :-)

关于OAuth 2 流程上的 iOS 9 WKWebView didReceiveAuthenticationChallenge,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32812829/

相关文章:

java - Keycloak:调用管理员 rest api 时无法将用户领域角色读取为管理员 cli

ios - 在 iOS 中模拟 YouTube Mini Player

ios - 尝试分别为多个文本字段创建选择器 View 输入

Objective-C - NSXML 读取我不会读取的新行

ios - AVAudioRecorder.record() 在 iOS 8 中总是返回 "false"

php - Laravel Passport 打印个人访问 token

javascript - Google Analytics Embed API - 未找到 OAuth 客户端

Spring OAuth2 ClientId 作为密码授予类型的用户名传入

ios - 如何在标签中放置 slider 值?

ruby - 我如何通过 Salesforce REST API 获得写入权限?