C# and wpf, problem with some uri fragments received

Hi,

I’m currently creating an C*/WPF standalone application (so no ASP server)

my login form contains a WPF Webbrowser to exchange informations with okta by the authorize endpoint.

if I use this syntax

var url = $"{OktaDomain}/oauth2/default/v1/authorize?" +

                     $"idp={oktaIdentifier}" +

                     $"&client_id={oktaClientId}" +

                     $"&response_type=id_token%20token" +

                     $"&response_mode=fragment" +

                     $"&scope=openid%20email%20profile" +

                     $"&redirect_uri={oktaRedirectUri}" +

                     $"&state=WM6D&nonce=YsG76jo";

           Web.Navigate(url); // Web is the webbrowser

the execution result of a good fragment at the end of the oktaRedirectUri

but if I use

           var url = $"{OktaDomain}/oauth2/{oktaIssuer}/v1/authorize?" +

                     $"idp={oktaIdentifier}" +

                     $"&client_id={oktaClientId}" +

                     $"&response_type=id_token%20token" +

                     $"&response_mode=fragment" +

                     $"&scope=openid%20email%20profile" +

                     $"&redirect_uri={oktaRedirectUri}" +

                     $"&state=WM6D&nonce=YsG76jo";

so the resulting oktaRedirectUri contains no fragment.

If I use the 2 url in Internet Explorer (version 11), the same result is obtened

If I use the 2 url in FireFox, then the 2 results are as expected (with fragment)

(and between each try, I clear my internet caches)

I must use the second syntax exclusively , and I prefer to use the integrated wpf webbrower

can you explain why this happens and how to solve ?

Thanks in advance

Luc

If I understand you correctly, you’re saying the second url does not return a set of tokens right? If yes, what is the value you’re using for {OktaIssuer}?

The issuer is usually either in the form of htttps://yourOrg.okta.com or htttps://yourOrg.okta.com/oauth2/{authz_server_id}. Just want to confirm that the error is not due to a bad url.

Hi Warren,

the error is not due to a bad url (the authz_server_id is the right one.

the url work with firefox, but not with internet explorer
(may be a compatibility concern ?)

luc