Asp.Net MVC Enable OAuth for Linkedin

OAuth for Linkedin is not installed by default.

You have to NuGet a package called “Owin.Security.Providers”.  It does LinkedIn Yahoo, etc.

Make sure you add the following to your Startup.Auth.cs

   1: using Owin.Security.Providers.LinkedIn;

you can then add the following:

   1: app.UseLinkedInAuthentication("xxxxxxxxx", "yyyyyyyyyyyyyyyy");

 

On Linked Developer portal (https://www.linkedin.com/developer/apps), you need to Create Application.

Once you fill out the necessary info, it will give you ClientID and Client Secret.  Most importantly, you need to specify OAuth 2.0 Authorized Redirect URLs.

If you are doing local development, you probably will specify a URL like “https://localhost:<xxxx>/signin-linkedin” where <xxxx> is your own port #.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s