Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Only first login works, consecutive logins cause browser tab to stay open without redirect #152

@calgara12

Description

@calgara12

I have a WPF .NET 4.8 app that needs to be switched to OIDC.

I have looked at the Samples, and managed to get the login working, however it only works on the first login, when I close my app and start it again, my browser gets launched, but i will not get redirected to my app. If I manually delete the cookies from my identity provider, then after I launch my app, it works again.
What could be causing this?

_options = new OidcClientOptions()
{
    Authority = "https://identityprovider.test.com",
    ClientId = "myApp",
    Scope = "openid profile email edit address",
    RedirectUri = "myapp://callback",
};
_client = new OidcClient(_options);


_state = await _client.PrepareLoginAsync();

// open system browser to start authentication
OpenBrowser(_state.StartUrl);

// Wait for the user to login
var result = await ReceiveSignInCallback(); // this is where it hangs once I launch my app again after a short time, clearing my cookies fixes it
RestAPI.InitializeClient(result.AccessToken;);

Also when my browser is launched the user does not need to enter credentials, he is verified by our authority provider through his windows credentials.

Thank you in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions