In one of my latest courses, Securing ASP.NET Core with OAuth 2.0 and OpenID Connect I explain how these standards can help with securing your web apps & APIs, using ASP.NET Core 1.1 and IdentityServer4. But: right after that course was finished, ASP.NET Core 2.0 was released… In regular circumstances I applaud fast release schedules, knowing they mainly add to existing code instead of drastically changing in. Lo and behold: dealing with authentication & authorization happened to be one of the parts of ASP.NET Core that was subject to quite a few changes… the principles still apply of course, but the code does have to change a bit to work in ASP.NET Core 2.0… bummer 🙂
One of the viewers of that course, Frans Harinck, took it upon himself to port my demo project to ASP.NET Core 2.0 and IdentityServer4. And what’s even better: he put it all on his GitHub. I figured I’d share this, as it’ll probably help a lot of people out.
You can find the updated demo code here. Happy coding! 🙂