-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Provide a way to set loginHint in Blazor with AAD auth #19925
Comments
Additionally, It would be useful to be able to supply the optional prompt parameter. I have cases where I would like to force a user to re-enter their credentials by using prompt=login. |
We've moved this issue to the Backlog milestone. This means that it is not going to happen for the coming release. We will reassess the backlog following the current release and consider this item at that time. However, keep in mind that there are many other high priority features with which it will be competing for resources. |
Also need domain hint in addition to login hint. Would you reconsider prioritizing this? It would be a very easy enhancement, just exposing the hint fields that already exist upstream. As it is now, users get a suboptimal experience of an extra unnecessary "choose your account" prompt when logging in. I can hear it now "Stupid site! I'm already logged in!" Issue came from https://stackoverflow.com/questions/63605653/is-there-a-way-to-supply-a-domain-hint-for-single-sign-on-using-msal-net-on-a-bl |
"affected-very-few" seems dubious. It affects very few because very few are using Blazor for sites that require auth. This one would be a barrier to increased adoption. |
Hi, I'd like to give a big +1 to adding loginHint support. We're working on a big Ignite announcement (March), that allows Conditional Access policy to be applied to parts of an app, like when sensitive files are accessed. I have a demo app using Blazor working with the feature and I want to highlight it, however the lack of support for loginHint is breaking the experience, because when the user is prompted to satisfy additional Conditional Access policies, they need to go through user selection again. Current behavior
|
I too want to reiterate how important this is for more fully featured enterprise SaaS apps. Blazor is starting to mature, but auth scenarios could use some more love. Edit: accidentally closed this issue trying out The new github app. 😅 |
The list is growing. Lets get on this please! |
I would like to reinforce the need to add login_hint functionality. Though, better solution is to map AuthenticationProperties.Parameters directly to OpenIdConnectMessage.Parameters at OpenIdConnectMessage creation. This solve all missing parameters, including login_hint and domain_hint. Until this is fixed, my solution was to create and use my own OpenIdConnectHandler extending the original one, and fix HandleChallengeAsync method so that it can handle parameters correctly. |
Add the following just under services.AddAuthentication(...) to add domain_hint services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme)
|
This is for Do you also have some magic tricks here? I have been searching the web and I keep coming back to the same few issues about this. Do note, this is used with Blazor WASM. |
This is covered by #42580 |
Some applications provide multiple alternative authentication methods for the user to choose from.
To discover the authentication method automatically the application may ask for user's email address and use it to redirect to correct authentication provider. When the user's email address is already known it should not be asked again by the authentication system.
The Azure AD and MSAL.js library provide the login_hint (AAD) and loginHint (MSAL.js) parameters that can be used to prefill the login email address. At the moment the Microsoft.Authentication.WebAssembly.Msal package doesn't offer any way to set the parameter.
MSAL.js docs
https://azuread.github.io/microsoft-authentication-library-for-js/docs/msal/modules/_authenticationparameters_.html#authenticationparameters
The text was updated successfully, but these errors were encountered: