有关改造LinkedIn社交登录模块的问题 [英] Questions on revamping the LinkedIn social login modules
问题描述
我目前正在使用LinkedIn来开发社交登录模块.官方文档说,自2019年1月12日起,使用OAuth 1.0的旧方法已过时.
I am currently working the social login modules using LinkedIn. The official documentation says the old method using OAuth 1.0 becomes obsolete since 12 Jan 2019.
请告诉我,如果使用O Auth 2.0并在Microsoft文档中提到该请求,将如何更改请求调用?
Would you please tell me what would the request call to be changed if using O Auth 2.0 and mentioned in the microsoft doc ?
下面是我的登录方法:
void startAutheniticate() {
LISessionManager.getInstance(getApplicationContext()).init(this,
buildScope(),
new AuthListener() {
@Override
public void onAuthSuccess() {
// Saved AccessToken
AccessToken accessToken = LISessionManager.getInstance(getApplicationContext()).getSession().getAccessToken();
}
@Override
public void onAuthError(LIAuthError error) {
}
}, true);
}
public static Scope buildScope() {
return Scope.build(Scope.R_BASICPROFILE, Scope.R_EMAILADDRESS, Scope.W_SHARE);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
LISessionManager.getInstance(getApplicationContext()).onActivityResult(this, requestCode, resultCode, data);
}
推荐答案
他们已弃用v1的实现,但尚未在Android上更新其LinkedIn应用程序(也不是SDK),因此唯一可用的解决方案是使用其JavaScript API通过 v2 实现对您的应用程序进行身份验证.
此外,他们说开发人员的时间要到 2019年3月1日,但是由于某些原因,如果您尝试使用LinkedIn SDK,则他们的Android应用程序现在将返回null
令牌(从2019年1月14日开始).验证您的应用
They have deprecated the v1 implementation but haven't yet updated their LinkedIn app (nor SDK) on Android, so the only solution available is to use their JavaScript API to authenticate your applications via v2 implementation.
Plus they said that developers had time until March 1, 2019 but for some reason their Android application is now returning a null
token (starting from January 14, 2019) if you try to use the LinkedIn SDK to authenticate your app
这篇关于有关改造LinkedIn社交登录模块的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!