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] 5.2.3 - Cookies with HttpOnly=True unable to be accessed while using Interactive Render Mode (SignalR + Javascript Interop). #4714

Open
thabaum opened this issue Oct 7, 2024 · 0 comments

Comments

@thabaum
Copy link
Contributor

thabaum commented Oct 7, 2024

Oqtane Info

Version - 5.2.3
Render Mode - Interactive
Interactivity - Server/WebAssembly
Database - SQL Server

Describe the bug

LanguageSwitcher does not switch language (Interactive Server / Interactive Webassembly) because of httpOnly culture cookie set to true and SignalR using JavaScript interop not allowing Oqtane to able to access these cookies directly.

Taken from discussion #4703

Expected Behavior

Culture (and visitor?) Cookie can be accessed while

Steps To Reproduce

Attempt switching languages via the LanguageSwitcher.razor control in the menu while using interactive render mode site setting.

Anything else?

Set 'HttpOnly=false' if render mode for the site is Interactive

Works OK while in Static Render Mode.

Can these cookies be created using middleware to avoid JavaScript?

https://learn.microsoft.com/en-us/dotnet/api/microsoft.net.http.headers.setcookieheadervalue.httponly?view=aspnetcore-8.0

https://learn.microsoft.com/en-us/dotnet/api/microsoft.net.http.headers.setcookieheadervalue?view=aspnetcore-8.0

@thabaum thabaum changed the title [BUG] 5.2.3 - Cookies unable to be accessed while using Interactive Render Mode (SignalR + Javascript Interop). [BUG] 5.2.3 - Cookies with HttpOnly=True unable to be accessed while using Interactive Render Mode (SignalR + Javascript Interop). Oct 7, 2024
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

No branches or pull requests

1 participant