IdentityModel.OidcClient icon indicating copy to clipboard operation
IdentityModel.OidcClient copied to clipboard

Usage ACR Values

Open dorarosi opened this issue 2 years ago • 2 comments

Hello I am trying to use ACR Values. But I get this error: Cannot implicitly convert type '<anonymous type: string acr_values>' to 'System.Collections.Generic.IDictionary<string, string>' I have searched the issues and found this: https://github.com/IdentityModel/IdentityModel.OidcClient.Samples/issues/44 https://github.com/IdentityModel/IdentityModel.OidcClient/issues/89

both do not work. My code currently looks like this and is inspiered by the first issue:

                var request = new LoginRequest();
                request.FrontChannelExtraParameters = new
                {
                    acrValues = "idp:gas:strong"
                };
                result = await _oidcClient.LoginAsync();

The solution of the second issue is no solution and only vague. There is also an issue referencing to some server stuff which is totally diffrent... Could someone point out my mistake?

dorarosi avatar May 24 '22 09:05 dorarosi

So I changed my code to:

                var request = new LoginRequest();
                request.FrontChannelExtraParameters.Add("acr_values", "idp:strong");
                result = await _oidcClient.LoginAsync(request);

Now I get the ACR Value, but the : ist replaced with %3A. Is this correct? I have no experience with OIDC, so not sure if this is wrong or the setting on the server.

dorarosi avatar May 24 '22 11:05 dorarosi

Please write a test to prove that this is a library problem.

leastprivilege avatar May 24 '22 12:05 leastprivilege