Skip to content

Fixes the login_hint and domain_hint challenge #812

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

Merged
merged 7 commits into from
Dec 6, 2020

Conversation

jmprieur
Copy link
Collaborator

@jmprieur jmprieur commented Dec 5, 2020

Fixes the login_hint and domain_hint challenge.
This is a complement to the fix done in #798, which was not sufficient

The issue was:

  • after fixing fix login/domain hint constant #800, MicrosoftIdentityConsentAndConditionalAccessHandler.ChallengeUser was now calling AccountController.Challenge with the login_hint and domain_hint parameters names (that is the OIDC parameter names), whereas the name of the method parameters are loginHint and domainHint. Added 2 new constants in Constants for these two method parameters names.
  • The AccountController.Challenge method was sending the login_hint and domaint_hint to the STS as properties whereas they should be parameters (this is a very subtle behavior of the OpenIdConnectMessage)

Tested on Caleb's application. The user is no longer requested to sign-in.
We probably need to check on the tests samples, but this should really improve the SSO experience

The issue was:
- we were now calling AccountController.Challenge with the login_hint and domain_hint parameters names (that is the OIDC parameter names), whereas the name of the method parameters are loginHint and domainHint. Added 2 new constants for these names.
- The AccountController.Challenge method was sending the login_hint and domaint_hint to the STS as properties whereas they should be parameters (this is very subtle)
@jmprieur jmprieur requested a review from jennyf19 December 5, 2020 12:53
jmprieur and others added 5 commits December 5, 2020 22:02
…change (#813)

Info: Azure Pipelines hosted agents have been updated and now contain .Net 5.x SDK/Runtime along with the older .Net Core version which are currently lts. Unless you have locked down a SDK version for your project(s), 5.x SDK might be picked up which might have breaking behavior as compared to previous versions. 

You can learn more about the breaking changes here: https://docs.microsoft.com/en-us/dotnet/core/tools/ and https://docs.microsoft.com/en-us/dotnet/core/compatibility/ . To learn about more such changes and troubleshoot, refer here: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/build/dotnet-core-cli?view=azure-devops#troubleshooting
##[error]Dotnet command failed with non-zero exit code on the following projects : D:\a\1\s\Microsoft.Identity.Web.sln
* fix build

* readd net 5
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 6, 2020

@jmprieur jmprieur merged commit a2844fe into master Dec 6, 2020
@jennyf19 jennyf19 deleted the jmprieur/challengeUsesLoginHint branch December 9, 2020 18:14
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

Successfully merging this pull request may close these issues.

2 participants