Unable to retrieve refresh_token via hybrid oauth2 flow

24 Views Asked by At

I am using the OAuth2 hybrid flow to authenticate my application. The initial authentication goes perfectly for 100%.

When I request CodeIdTokenToken I am only getting the code, IdToken and Token (as I requested). But I also want the initial RefreshToken for later use.

What am I missing?

The client uses OWIN for MVC 5.2 and the server is a .NET CORE Identity Server 4 application.

enter image description here

As you can see. Everything is there at the end, except for the refresh token.

1

There are 1 best solutions below

0
On

You need to enable refresh token support in the Client definition inside IdentityServer.

new Client()
{
    AllowOfflineAccess = true,
    ...