Which version of Microsoft Identity Web are you using?
0.2.1-preview
Where is the issue?
Repro
Create new net core app
Add identity web auth
Define AzureAd properties in config file with domain property defined but no login hint
Runt the Web app and Web API
Expected behavior
Domain hint to be added to the authorization request even if login hint isn't specified
Actual behavior
domain hint doesn't get added to the authorization call
Possible solution
Move domain hint definition outside the if clause
Hi,
I was working with this package to get a web app running with Azure AD, but found that defining the domain did not add it into my authentication request thus not directly opening the federation login page.
I found that this was because domain_hint is only being added when login_hint is not blank or null.
Is this a bug? I was under the assumption that domain_hint could be provided without a login_hint.
|
var login = context.Properties.GetParameter<string>(OpenIdConnectParameterNames.LoginHint); |
|
if (!string.IsNullOrWhiteSpace(login)) |
|
{ |
|
context.ProtocolMessage.LoginHint = login; |
|
context.ProtocolMessage.DomainHint = context.Properties.GetParameter<string>( |
|
OpenIdConnectParameterNames.DomainHint); |
|
|
|
// delete the login_hint and domainHint from the Properties when we are done otherwise |
|
// it will take up extra space in the cookie. |
|
context.Properties.Parameters.Remove(OpenIdConnectParameterNames.LoginHint); |
|
context.Properties.Parameters.Remove(OpenIdConnectParameterNames.DomainHint); |
|
} |
Which version of Microsoft Identity Web are you using?
0.2.1-preview
Where is the issue?
Web app
Web API
Token cache serialization
Other (please describe)
Repro
Create new net core app
Add identity web auth
Define AzureAd properties in config file with domain property defined but no login hint
Runt the Web app and Web API
Expected behavior
Domain hint to be added to the authorization request even if login hint isn't specified
Actual behavior
domain hint doesn't get added to the authorization call
Possible solution
Move domain hint definition outside the if clause
Hi,
I was working with this package to get a web app running with Azure AD, but found that defining the domain did not add it into my authentication request thus not directly opening the federation login page.
I found that this was because domain_hint is only being added when login_hint is not blank or null.
Is this a bug? I was under the assumption that domain_hint could be provided without a login_hint.
microsoft-identity-web/src/Microsoft.Identity.Web/WebAppExtensions/WebAppAuthenticationBuilderExtensions.cs
Lines 135 to 146 in bd0c266