gpt4 book ai didi

swift - 如何在 tvOS 中授权 OAuth2

转载 作者:行者123 更新时间:2023-11-28 15:58:46 25 4
gpt4 key购买 nike

应用程序进入未知状态并且不执行任何操作我在 P2Auth2 的 didFinishLaunchingWithOptions 中有此代码并且无法授权

    Authenticator.sharedInstance.oauth2 = OAuth2
Authenticator.sharedInstance.reauthorizeSilently(callback: { (wasFailure, error) -> Void in
if (!wasFailure) {
print("Re-Auth Successfull")

} else {
print("Re-Auth failed")
}
})
return true

最佳答案

由于 tvOS 不支持网页 View ,您似乎不太可能直接从 AppleTV 登录。大多数成功的 AppleTV 解决方案使用第二个设备来获取 OAuth 登录 token 。如果您无需使用 OAuth2 即可直接进行身份验证,我建议您这样做。

关于swift - 如何在 tvOS 中授权 OAuth2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41385321/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com