Closed hanoj-budime closed 6 months ago
Hello, @hanoj-budime and thanks for opening this issue. The feature request to have support for httpOnly cookies is also captured within issue #8147, so we'll close this as a duplicate. The one difference I'll call out between the the two issues is that it looks like you're developing a React app, which would inherently be client side. The feature and solution we are looking into for httpOnly cookies would be exclusive to having this capability on the server side.
But again, we're looking into a solution at this point and will communicate progress on issue #8147 for httpOnly cookie support. Let us know if there are further questions and feel free to upvote, comment, or add additional context to the other issue. Thanks!
Before opening, please confirm:
JavaScript Framework
React
Amplify APIs
Authentication
Amplify Version
v6
Amplify Categories
auth
Backend
None
Environment information
Describe the bug
How do you set the HttpOnly flag for cookies?
Expected behavior
Basically, I want to ensure that our cookies are more secure. Is it recommended to enable both 'HttpOnly' and 'Secure'? Use secure cookies: Always mark cookies containing sensitive information as secure, ensuring they are only transmitted over HTTPS connections. HttpOnly flag: Set the HttpOnly flag on cookies to prevent client-side scripts from accessing them. This mitigates risks like XSS attacks, where an attacker injects malicious scripts into a web page to steal cookies.
Reproduction steps
Code Snippet
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response