In OAuth1.0 "Login with Linkedin" Working fine but before few days Linkedin make some changes in their policy, please refer below link for more detail, https://engineering.linkedin.com/blog/2018/12/developer-program-updates
I also tried some GitHub example and other reference but unfortunately not work for me, I also tried below link but it did not fulfill the exact requirement.
Oauth 2.0 authorization for LinkedIn in Android
You can also refer below link, may it give some result, I also know Linkedin SDK not work here as they declared here, https://developer.linkedin.com/docs/android-sdk We have to call manual URL and open into Webview.
I also check 3-4 apps which earlier had LinkedIn support for authentication but now they removed it but I check one app namely "Nuzzel" in that I found Linked in authentication and it's working fine so it means there is some way to do it properly. Nuzzel App Link:- https://play.google.com/store/apps/details?id=com.nuzzel.android&hl=en_GB
Thanks
After a little effort I got it working, but implementing it every time you start a new project will waste a lot of time.
So I created a light weight library for the same.
Just add the dependency to your app level
build.gradle
fileInitiate Login Request.
Handle the response:
I'm using this library in multiple production apps, so I'll try to keep it as updated as possible. You can find other details here.
Inspired by @Shantanu, I've restructured/updated his "unofficial" SDK for Android, you can use it from [this GitHub repo](https://github.com/AbdAllahAbdElFattah13/LinkedIn-SDK-Android.
It's now Kotlin based and follows clean architecture principles for better understanding and modifications.
We also use it in our production apps, so it should be working fine. :)
Here is my code, to implement sign in with "0Auth2.0"
If you want further assistance go to below link explained how to sign in with Linkedin with auth 2.0. Have a look
linkedin integration with oauth20 -v2-in-complete implementation ain android
I created a small library to implement LinkedIn Authentication via OAuth2
Library - https://github.com/Sumudu-Sahan/LinkedInManager
Steps
Add the below maven dependency to your project level
build.gradle
fileallprojects { repositories { ... maven { url 'https://jitpack.io' } } }
add the below maven dependency to your app level
build.gradle
filedependencies { implementation 'com.github.Sumudu-Sahan:LinkedInManager:1.00.02' }
Inherit your activity, fragment from
LinkedInManagerResponse
public class MainActivity extends AppCompatActivity implements LinkedInManagerResponse
Initiate the
LinkedInRequestManager
object instance for login processLinkedInRequestManager linkedInRequestManager = new LinkedInRequestManager(Activity, LinkedInManagerResponse, "CLIENT ID", "CLIENT SECRET", "REDIRECTION URL");
Start Authenticate with below statement
linkedInRequestManager.showAuthenticateView(LinkedInRequestManager.MODE_BOTH_OPTIONS);
Available Modes