{"id":13735,"date":"2017-08-22T00:00:00","date_gmt":"2017-08-22T05:00:00","guid":{"rendered":"https:\/\/centricconsulting.com\/post\/tech-tuesday-tips-asp-net-core-angular2-openid-connect-vs-code_boston\/"},"modified":"2022-01-03T14:02:28","modified_gmt":"2022-01-03T19:02:28","slug":"tech-tuesday-tips-asp-net-core-angular2-openid-connect-vs-code_boston","status":"publish","type":"post","link":"https:\/\/centricconsulting.com\/blog\/tech-tuesday-tips-asp-net-core-angular2-openid-connect-vs-code_boston\/","title":{"rendered":"#TechTuesday Tips: ASP.NET Core + Angular2 + OpenID Connect in Visual Studio Code"},"content":{"rendered":"

Our regular series of #TechTuesday Tips aims to help you resolve your technical issues.<\/h2>\n

In our latest installment of #TechTuesday Tips, learn how to integrate an Angular2 application, running on ASP.NET Core, with an OpenID Connect implementation.<\/h4>\n

Also included in this post: IdentityServer4 is built using OpenID Connect; oidc-client, which is a JS module and a component that allows our Angular2 application to interact with an OpenID Connect<\/a> implementation. Oidc-client uses sessionStorage to store Access and Refresh tokens.<\/p>\n

Because it uses sessionStorage in nodejs, it sometimes gives you compilation errors. We’ll explain how to resolve this issue as well.<\/p>\n

#1 Getting the Template<\/h3>\n

The first step is to create a SPA (Single Page Application)\u00a0.NET Core project using Visual Studio 2015 Community Edition. Make sure you have the latest VS update and download the proper template, as per Steve Sanderson’s blog<\/a>).<\/p>\n

Another easy approach is to simply clone the following GitHub project:<\/p>\n