Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only first login works, when launching app again, it doesnt #435

Open
calgara12 opened this issue Jun 21, 2024 · 0 comments
Open

Only first login works, when launching app again, it doesnt #435

calgara12 opened this issue Jun 21, 2024 · 0 comments

Comments

@calgara12
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant