Search code examples
identityserver4

How MVC client get tokens from IdentityServer4


I'm studying IdentityServer4 and creating the MVC client as this guide https://docs.identityserver.io/en/latest/quickstarts/2_interactive_aspnetcore.html

what part I don't understand is that how Ids4 send id_token and access_token to mvc client after logged in Ids4?


Solution

  • Depending on the flow, but if you use the authorization code flow, then an authorization code is returned to the client after the user authenticates, and using this code, it can then send it back to IdentityServer to retrieve the actual tokens. This is done directly between the client and IdentityServer and this you don't see in the browser.