1 year ago

#353928

test-img

SurenSaluka

IdentityModel RefreshToken impementation issue

I use the following code to log in via OIDC. This is a UWP app with IdentityModel.OidcClient 5.0.0

LoginRequest loginRequest = new LoginRequest
{
   FrontChannelExtraParameters = new IdentityModel.Client.Parameters(parameter)
};

LoginResult result = await IdentityManager.GetOidcClient().LoginAsync(loginRequest);

So in the LoginResult, I have the RefreshToken IdentityToken AccessToken to use in the code. What I don't understand is after token expiration I get HTTP401 and I call

RefreshTokenResult result = await IdentityManager.GetOidcClient().RefreshTokenAsync(
                    result.RefreshToken);

This is also getting success. My issue is how do I get the RefreshTokenResult's values such as RefreshToken IdentityToken AccessToken back to the LoginResult? (LoginResult has internal-set properties is the reason I can't set it)

Or Am I doing this wrong? I can't happen to find a single sample with an OIDC implementation. Appreciate your support.

enter image description here

uwp

win-universal-app

identityserver4

openid-connect

identity

0 Answers

Your Answer

Accepted video resources