Auth v6 - How to set cookie HttpOnly? ( Token-saving mechanism - Cookie Storage ) #13376
Closed
3 tasks done
Labels
Auth
Related to Auth components/category
duplicate
If marked with duplicate, issue will be closed & original will be added for traceability
feature-request
Request a new feature
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
// Put your code below this line.
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
The text was updated successfully, but these errors were encountered: