![]() ![]() ![]() Dig into the AuthenticationBuilder if you want some great insight into what registering these providers is actually doing under the covers. However, my first attempt failed and as part of figuring out why, I logged an issue and started digging into the ASP.NET Core Authentication process. Failure is an OptionĪs they say, security is hard and I thought I understood the OAuth 2.0 flows pretty well. I spent longer than I expected in the docs and source, but I learned SO MUCH! A big thanks to the project maintainers, and especially Martin Costello □️□□□ for the LinkedIn implementation and the assist. I highly recommend a read of the ASP.NET Core Authentication docs and source code. Of course, you could clone and run the MVC client sample, but I learn best with hands on keyboard so I took the long road. I use Visual Studio Code below, but using Visual Studio 2019 should work fine, you'll have to translate creating the project, managing packages, and more via the terminal in Visual Studio Code to Visual Studio proper. This post creates a simple solution using LinkedIn and GitHub providers to authenticate users. The docs are excellent, and the same paragraph that mentioned external providers pointed me to the community contributed providers! The aspnet-contrib/ is an aspnet-contrib () project with more than 60 external providers, including LinkedIn! ![]() Out of the box, ASP.NET Core supports multiple external providers but not LinkedIn. I wanted to write this post in appreciation of the aspnet-contrib OSS contributors and for when I need to do this again! The ASP.NET OAuth2.0 Providers Not only did I find a simple way to log in using LinkedIn OAuth, but learned at ton about ASP.NET Core authentication. I initially used the docs PostMan sample to learn the API's, but I wanted to use ASP.NET Core for a simple UI to enable persisting the access and refresh tokens. A recent side project to capture some data using LinkedIn API's required using the OAuth 2.0 Authorization Code flow for most of the API's. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |