Skip to content

Fixes the login_hint and domain_hint challenge - #812

Merged
Jean-Marc Prieur (jmprieur) merged 7 commits into
masterfrom
jmprieur/challengeUsesLoginHint
Dec 6, 2020
Merged

Jean-Marc Prieur (jmprieur) merged 7 commits into
masterfrom
jmprieur/challengeUsesLoginHint

Conversation

@jmprieur

Copy link
Copy Markdown
Collaborator

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)
…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
Comment thread build/template-install-dotnet-core.yaml Resolved
@sonarqubecloud

sonarqubecloud Bot commented Dec 6, 2020

Copy link
Copy Markdown

@jmprieur
Jean-Marc Prieur (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