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

Fix CookieAuthenticationOptions configuration #17632

Closed
wants to merge 1 commit into from

Conversation

hishamco
Copy link
Member

Fixes #17631

@hishamco hishamco requested a review from Piedone March 16, 2025 18:38
{
var userOptions = ShellScope.Services.GetRequiredService<IOptions<UserOptions>>();

options.Cookie.Name = "orchauth_" + HttpUtility.UrlEncode(_tenantName);
Copy link
Member

@kevinchalet kevinchalet Mar 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning-lights

This will badly break all OC apps using Identity (so basically most OC apps 😄), as you're now overriding the cookie name of all the instances of the cookies handler to share the same exact value, which means the Identity application, external, two-factor cookies will collide, resulting in weird things like being unable to log in with an external provider.

See #17631 (comment) for the proper way to resolve the options.

@hishamco hishamco closed this Mar 16, 2025
@hishamco hishamco deleted the hishamco/cookie-auth-options branch March 16, 2025 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to access proper values for CookieAuthenticationOptions
2 participants