使用 AppAuth 显示附加警报以在 swift4 中进行身份验证

Additional alert shows up using AppAuth to authenticate in swift4

我正在使用 AppAuth 0.90.0 使用外部身份验证服务器进行身份验证,用户可以在其中登录,以便应用程序接收适当的身份验证令牌。最近(升级到 swift 4 后)我在发送到身份验证服务器之前收到以下警报:

"App Name" Wants to Use "externalAuthentication.com" to Sign in"

This allows the app and website to share information about you.

有人遇到过同样的问题吗and/or有解决方案,这样用户就不需要在每次向该服务器发出请求时按继续?

发生这种情况是因为 AppAuth 默认使用 SFAuthenticationSession 而不是 iOS11 上的 SFSafariViewController。不幸的是,目前我们无法更改或删除使用 SFAuthenticationSession 时的这些警报。您可以关注此 Github thread,其中讨论了在 iOS11 上使用 AppAuth 时的问题和变化。