这需要使用 ASWebAuthenticationSession 获取身份验证 code 码。 网站登录身份验证逻辑: 一些网站作为一种服务提供了一种用于验证用户身份的安全机制。 ▐ 3.2 定义全局变量 var session: ASWebAuthenticationSession! var session : ASWebAuthenticationSession! "&response_type=CODE&client_id=" + Configuration.shared.awsConfiguration.appClientId session = ASWebAuthenticationSession ViewController: ASWebAuthenticationPresentationContextProviding { func presentationAnchor(for session: ASWebAuthenticationSession
Authorization 创建一个“登录”按钮,该按钮将在应用程序中打开一个安全的网络浏览器(ASWebAuthenticationSession或SFSafariViewController在 iOS 当用户点击“登录”按钮时,应用程序应在安全的应用程序内浏览器(ASWebAuthenticationSession在 iOS 上,或在 Android 上的“自定义选项卡”)中打开授权 URL。 在 iOS 上,这是ASWebAuthenticationSession或SFSafariViewController,在 Android 上,这被称为“自定义标签”。
Kyle Ye 从发现 Link 在 watchOS 上无法直接打开链接的问题入手,深入研究了 Link 组件的内部实现,最终找到了一种无需通过 ASWebAuthenticationSession 的新解决方案