Apple tvOS 和 OAuth
Apple tvOS and OAuth
我刚刚为 iOS 完成了一个非常好的 SDK。此 SDK 处理的主要功能是通过 OAuth 登录。为了让用户登录,我展示了一个应用程序内浏览器 (SFViewController),展示了一个托管在我的服务器上的登录页面......
我的问题是,如何使用 tvOS 执行 OAuth 登录...如果我没记错的话,我无法显示 webview 或打开外部浏览器,对吗?
没错,tvOS 上没有网络视图或外部浏览器。如果您必须使用 OAuth,请遵循此 SO 问题的答案中的想法: - 将您的用户重定向到 Web 或配套应用,在代表 tvOS 应用程序。
我建议避免对没有浏览器或浏览器输入繁琐等的 tvOS 应用或类似 "tv devices" 使用 OAuth
您可以查看 "rendezvous" 注册流程。 Roku 开发者网站上有详细说明。 Roku 类似于 Apple TV。当你有一个现有的 site/user 基础时,这个流程很方便,其中身份验证必须(并且可能已经)在许多不同的设备上得到支持,而不仅仅是在苹果世界中。
This overview describes the typical flow and API used for registering
and linking a device to an authentication service. The primary and
recommended method for linking a device involves 3 main steps:
Display a short on-screen registration code (generated on the server)
on the Roku device.
The user links the device by entering the registration code on the
provider's website/service.
The service confirms the code is correct and issues a token to the
Roku device. Once the device downloads the token, the channel displays
a congratulations screen and allows the user access to the video
service. The next time the channel is launched, the service will check
if the token matches.
This is known as the "rendezvous" style of registration.
https://developer.roku.com/en-gb/docs/developer-program/authentication/authentication-and-linking.md
我刚刚为 iOS 完成了一个非常好的 SDK。此 SDK 处理的主要功能是通过 OAuth 登录。为了让用户登录,我展示了一个应用程序内浏览器 (SFViewController),展示了一个托管在我的服务器上的登录页面...... 我的问题是,如何使用 tvOS 执行 OAuth 登录...如果我没记错的话,我无法显示 webview 或打开外部浏览器,对吗?
没错,tvOS 上没有网络视图或外部浏览器。如果您必须使用 OAuth,请遵循此 SO 问题的答案中的想法:
我建议避免对没有浏览器或浏览器输入繁琐等的 tvOS 应用或类似 "tv devices" 使用 OAuth
您可以查看 "rendezvous" 注册流程。 Roku 开发者网站上有详细说明。 Roku 类似于 Apple TV。当你有一个现有的 site/user 基础时,这个流程很方便,其中身份验证必须(并且可能已经)在许多不同的设备上得到支持,而不仅仅是在苹果世界中。
This overview describes the typical flow and API used for registering and linking a device to an authentication service. The primary and recommended method for linking a device involves 3 main steps:
Display a short on-screen registration code (generated on the server) on the Roku device.
The user links the device by entering the registration code on the provider's website/service.
The service confirms the code is correct and issues a token to the Roku device. Once the device downloads the token, the channel displays a congratulations screen and allows the user access to the video service. The next time the channel is launched, the service will check if the token matches.
This is known as the "rendezvous" style of registration.
https://developer.roku.com/en-gb/docs/developer-program/authentication/authentication-and-linking.md