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

Signout from ExternalProvider and 2FA #98

Open
skoruba opened this issue Oct 10, 2020 · 2 comments
Open

Signout from ExternalProvider and 2FA #98

skoruba opened this issue Oct 10, 2020 · 2 comments

Comments

@skoruba
Copy link

skoruba commented Oct 10, 2020

Hi @damienbod

when I want to sign in via external OIDC provider and it is required 2FA, I am redirected to login page with 2FA which works well. But after that I got the claim called idp, but with value local - the information about external IdP is gone.

After attempt to sign out - the redirect to external provider is not execuded because the claim idp is local, not oidc.

if (idp != null && idp != IdentityServer4.IdentityServerConstants.LocalIdentityProvider)

Do you have any idea how to configure these things for following scenario?

Thanks!

Jan

@damienbod
Copy link
Owner

@skoruba

Hi Jan

The mapping for the external claims are not mapped to the Principal from the "local" user. You can map these as required in the account controller method which handles the callback from the external provider. In this method the external principal is cleaned up, so you can change this, persist this as needed.

Greetings Damien

@skoruba
Copy link
Author

skoruba commented Oct 11, 2020

Hello @damienbod
thank you for your idea - I probable solved this issue with custom implementation of SignInManager and method SignInWithClaimsAsync - https://github.com/skoruba/IdentityServer4.Admin/blob/dev/src/Skoruba.IdentityServer4.STS.Identity/Helpers/ApplicationSignInManager.cs#L60-L66

I think this issue was connected to this behaviour of idp claim here:
https://github.com/IdentityServer/IdentityServer4/blob/main/src/IdentityServer4/src/Hosting/IdentityServerAuthenticationService.cs#L125-L143

We added in this method - SignInWithClaimsAsync - also id_token for correct signout from External IdP.

Thanks!

Jan

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

No branches or pull requests

2 participants