title: How to use ASP.NET Core MVC with Angular using Identity Server 4 to connect to web API
body: <p>I am writing after the response recieved from the <a href="https://github.com/IdentityServer/IdentityServer4/issues/1179#issuecomment-304032678" rel="nofollow noreferrer">post here</a></p>
  
  <p><strong>--------------------------------------</strong></p>
  
  <p>I am in the process of developing an application that has an MVC core app that simply loads the angular application. The angular application will then connect to a Web API to perform CRUD operations.</p>
  
  <p>Im aware its possible to use cookie authentication in conjuction with odic hybrid flow to generate a cookie, but not sure how the angular app can get a reference to the access token and renew it when it expires in order to connect to my web api.</p>
  
  <p>I read through this article <a href="https://damienbod.com/2017/05/06/secure-asp-net-core-mvc-with-angular-using-identityserver4-openid-connect-hybrid-flow/" rel="nofollow noreferrer">https://damienbod.com/2017/05/06/secure-asp-net-core-mvc-with-angular-using-identityserver4-openid-connect-hybrid-flow/</a> and watched this video <a href="https://www.youtube.com/watch?v=5OUQZAvxZuA&amp;feature=youtu.be&amp;t=30m40s" rel="nofollow noreferrer">https://www.youtube.com/watch?v=5OUQZAvxZuA&amp;feature=youtu.be&amp;t=30m40s</a> but none of it explains how the angular app can get a hold of the access token to query other APIs.</p>
  
  <p>I would greatly appreciate if someone of you could explain the best procedure to gain access to the access token, and also periodically renew it using the refresh token.</p>