Accessing the OIDC tokens in ASP.NET Core 2.0

In ASP.NET Core 1.1 So, for example, in ASP.NET Core 1.x, if you wanted to access the tokens (id_token, access_token and refresh_token) from your application, you could set the SaveTokens property when registering the OIDC middleware: 1 2 3 4 5 6 7 8 // Inside your Configure method app.UseOpenIdConnectAuthentication(new OpenIdConnectOptions(“Auth0”) {     // Set all your OIDC options…     // and then set SaveTokens to save tokens to the AuthenticationProperties     SaveTokens = true }); You would then subsequently be able to retrieve those tokens by calling GetAuthenticateInfoAsync inside your controllers, and…

Read More