Support multiple authentication schemes for single identity provider #19302
howej
started this conversation in
Features and ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
For one identity provider, there may be multiple authentication schemes available. For example, one using standard OAuth, and the other one using QR code. When I implemented the logic as follow within Umbraco 15:
I found it works well during authentication, but was not able to link the loginUser to umbracoIdentityUser, because during the link-user process, Umbraco will look for the LoginProvider registered in DI container. The problem would be "AutoSelect" was not in the LoginProviders collection, so the link-user process fails.
My suggestion is, after the user has authenticated and call back to Umbraco authorize endpoint, checks the auth scheme. If PolicyScheme is detected, check its ForwardDefaultSelector to get the actual auth scheme, then get the login provider object from DI, finally invoke the AutoLink method.
Beta Was this translation helpful? Give feedback.
All reactions