Questions on revamping the LinkedIn social login modules

偶尔善良 提交于 2019-12-13 23:04:58

问题


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.

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 ?

Below is my login method:

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);
}

https://docs.microsoft.com/en-us/linkedin/shared/authentication/authorization-code-flow?context=linkedin/consumer/context


回答1:


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



来源:https://stackoverflow.com/questions/54212633/questions-on-revamping-the-linkedin-social-login-modules

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!