使用 LinkedIn 的 iOS 9 SDK 通过 webview 而不是 LinkedIn 的移动应用程序进行身份验证
Using LinkedIn's iOS 9 SDK for authentication with a webview instead of LinkedIn's mobile app
我的 iOS 应用目前为用户提供了使用他们的 LinkedIn 帐户登录和注册的选项。我将这个项目用于 LinkedIn 日志和 OAuth:LinkedInOAuth
随着 iOS 9 的更新,当用户尝试使用该项目通过 LinkedIn 登录时,我的应用程序现在偶尔会崩溃,并出现运行时异常 WebThread(18): EXC_BAD_ACCESS(代码=1,地址=0x8)
为了解决这个偶然的崩溃问题,我转向了我使用的 project 的更新版本,它符合 ios 9 和 linkedin 的 ios 9 SDK。
问题是,虽然这个新项目解决了 WebThread 崩溃问题,但它现在需要用户下载 LinkedIn 的应用程序(如果他们没有)才能使用 LinkedIn 登录我的应用程序。
之前的项目从来没有这样的要求,并且会呈现一个允许任何拥有 linkedin 帐户的人登录的 webview。
我的问题是我想知道是否可以在 ios9 中使用 LinkedIn 进行身份验证而不需要用户下载移动应用程序?我希望可以更新旧项目以符合 ios 9,同时简单地呈现一个 webvew。谢谢!
我们上周才讨论过这个问题(当时您的问题没有答案,但很高兴现在为您更新——也就是说,如果您在此期间还没有解决这个问题)。
在搜索了几个来源后,我发现了这个:
Mobile vs server-side access tokens
Presently, there is no mechanism available to exchange them. If you
require tokens that can be used in both the mobile and server-side
environment, you will need to implement a traditional OAuth 2.0
solution within your iOS environment to acquire tokens that can be
leveraged in both situations.
来自:https://developer.linkedin.com/docs/ios-sdk-auth
前提是通过移动解决方案,他们通过他们的应用程序提供单点登录。这有效,但需要他们的应用程序。 Apple 的审批流程在这方面摇摆不定,看来他们是否允许这样做(第三方应用程序的要求)似乎只是掷硬币。 @AroundThen 没有任何运气,他的应用程序由于要求而被拒绝,但是,其他用户*表示 Apple 在他们的申请过程中并没有反对它。
或者,它们是使用 OAuth2 的 Web 登录过程。对于他们的非移动解决方案来说,这是相当不错的选择。目前在移动和网络解决方案之间共享令牌不是默认设置,如果你想共享相同的令牌,他们的解决方案就是上面列出的。
本质上(从我的另一个答案here复制而来):
You can test for the presence of the linked-in app:
- if it is not there: implement OAuth2 directly through your app
- if it is there: use it or your OAuth2 implementation (which you'd probably err on the side of using their app for the link-ability between any features of the app you may need in yours).
Thereby avoiding the REQUIREMENT to have the app installed, but utilising it if it is.
This suggests that authentication away from the app is supported.
据报道,@AroundThen 已经有 success with this process。
祝你好运!
*1 我目前无法找到他的 post,但基本上他提供了 Apple 试图使用的登录凭据,但存在位置问题因此无法进入,但据推测他们如果他们有的话,可能已经批准了。
我的 iOS 应用目前为用户提供了使用他们的 LinkedIn 帐户登录和注册的选项。我将这个项目用于 LinkedIn 日志和 OAuth:LinkedInOAuth
随着 iOS 9 的更新,当用户尝试使用该项目通过 LinkedIn 登录时,我的应用程序现在偶尔会崩溃,并出现运行时异常 WebThread(18): EXC_BAD_ACCESS(代码=1,地址=0x8)
为了解决这个偶然的崩溃问题,我转向了我使用的 project 的更新版本,它符合 ios 9 和 linkedin 的 ios 9 SDK。
问题是,虽然这个新项目解决了 WebThread 崩溃问题,但它现在需要用户下载 LinkedIn 的应用程序(如果他们没有)才能使用 LinkedIn 登录我的应用程序。
之前的项目从来没有这样的要求,并且会呈现一个允许任何拥有 linkedin 帐户的人登录的 webview。
我的问题是我想知道是否可以在 ios9 中使用 LinkedIn 进行身份验证而不需要用户下载移动应用程序?我希望可以更新旧项目以符合 ios 9,同时简单地呈现一个 webvew。谢谢!
我们上周才讨论过这个问题(当时您的问题没有答案,但很高兴现在为您更新——也就是说,如果您在此期间还没有解决这个问题)。
在搜索了几个来源后,我发现了这个:
Mobile vs server-side access tokens
Presently, there is no mechanism available to exchange them. If you require tokens that can be used in both the mobile and server-side environment, you will need to implement a traditional OAuth 2.0 solution within your iOS environment to acquire tokens that can be leveraged in both situations.
来自:https://developer.linkedin.com/docs/ios-sdk-auth
前提是通过移动解决方案,他们通过他们的应用程序提供单点登录。这有效,但需要他们的应用程序。 Apple 的审批流程在这方面摇摆不定,看来他们是否允许这样做(第三方应用程序的要求)似乎只是掷硬币。 @AroundThen 没有任何运气,他的应用程序由于要求而被拒绝,但是,其他用户*表示 Apple 在他们的申请过程中并没有反对它。
或者,它们是使用 OAuth2 的 Web 登录过程。对于他们的非移动解决方案来说,这是相当不错的选择。目前在移动和网络解决方案之间共享令牌不是默认设置,如果你想共享相同的令牌,他们的解决方案就是上面列出的。
本质上(从我的另一个答案here复制而来):
You can test for the presence of the linked-in app:
- if it is not there: implement OAuth2 directly through your app
- if it is there: use it or your OAuth2 implementation (which you'd probably err on the side of using their app for the link-ability between any features of the app you may need in yours).
Thereby avoiding the REQUIREMENT to have the app installed, but utilising it if it is.
This suggests that authentication away from the app is supported.
据报道,@AroundThen 已经有 success with this process。
祝你好运!
*1 我目前无法找到他的 post,但基本上他提供了 Apple 试图使用的登录凭据,但存在位置问题因此无法进入,但据推测他们如果他们有的话,可能已经批准了。