Skip to content
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

[Bug] NonceCookie and CorrelationCookie configurations provided in AddMicrosoftIdentityWebApp are not honored #1262

Closed
2 of 8 tasks
vh-vahan opened this issue Jun 11, 2021 · 2 comments
Labels
bug Something isn't working fixed web app

Comments

@vh-vahan
Copy link

Which version of Microsoft Identity Web are you using? 1.12.0
Note that to get help, you need to run the latest version.

Where is the issue? AddMicrosoftIdentityWebApp method accepts Action to configure the MicrosoftIdentityOptions. MicrosoftIdentityOptions inherits from OpenIdConnectOptions, so it is possible to configure the Nonce cookie and Correlation cookie using the NonceCookie and CorrelationCookie properties that return CookieBuilder(for example change the samesite or secure settings). Though what i can see is that the provided configuration is ignored and the default is being returned as defined in the OpenIdConnectOptions.

  • Web app
    • Sign-in users
    • Sign-in users and call web APIs
  • Web API
    • Protected web APIs (validating tokens)
    • Protected web APIs (validating scopes)
    • Protected web APIs call downstream web APIs
  • Token cache serialization
    • In-memory caches
    • Session caches
    • Distributed caches
  • Other (please describe)

Is this a new or an existing app? This is a new app

Repro

Expected behavior
A clear and concise description of what you expected to happen (or code).
Nonce and Correlation cookies set in response should have the provided configuration(secure, samesite)

Actual behavior
A clear and concise description of what happens, e.g. an exception is thrown, UI freezes.
Nonce and Correlation cookies have the defaults set in OpenIdConnectOptions constructor

Possible solution

Additional context / logs / screenshots
Add any other context about the problem here, such as logs and screenshots.

@jennyf19
Copy link
Collaborator

@vh-vahan do you mind trying this branch to see if the issue is resolved?

@jennyf19 jennyf19 added the fixed label Aug 13, 2021
@jennyf19
Copy link
Collaborator

Included in 1.16 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed web app
Projects
None yet
Development

No branches or pull requests

2 participants