【问题标题】:Replacing AppAuth with custom SFSafariViewController in IOS在 IOS 中用自定义 SFSafariViewController 替换 AppAuth
【发布时间】:2021-01-27 18:59:43
【问题描述】:

我想用自定义 SFSafariViewController 替换 appauth 以进行登录并从 web 获取令牌。任何人都可以通过一些示例或教程帮助我如何继续此操作。

由于我是 iOS 开发的初学者,我不知道从哪里开始。谢谢。

AppAuth - https://github.com/openid/AppAuth-iOS

【问题讨论】:

    标签: ios swift sfsafariviewcontroller


    【解决方案1】:

    登录不是在 SFSafariViewController 中执行的,而是在 ASWebAuthenticationSession 中执行的。无法覆盖 ASWebAuthenticationSession 的 Safari 视图(这是一项操作系统功能)。

    如果您自己在自定义 SFSafariViewController 中实现 OpenID 流,则需要在 info.plist 文件和 AppDelegate 中声明回调 URL。它会更不安全,也更不友好。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多