CookieStorage with httpOnly
See original GitHub issue** Which Category is your question related to? ** Auth
** What AWS Services are you utilizing? ** Cognito
** Provide additional details e.g. code snippets ** I’m using Amplify with my React app and would like to secure my API using JWTs (not using AWS API Gateway).
Is it possible to use Amplify Auth with CookieStorage and httpOnly
? I’d like to prevent XSS with the httpOnly
flag but looking at the interface for ICookieStorageData
it looks like this isn’t supported. Is it even possible to add support for this?
Alternatively what’s the recommended authentication configuration/flow from a security perspective? I’ve seen the doc mention things like localStorage but from my understanding it’s not secure from a XSS perspective.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:42
- Comments:27 (5 by maintainers)
Top Results From Across the Web
HttpOnly Cookies with AWS Cognito - Stack Overflow
The CookieStorage object only takes domain, path, expires, and secure configurations. Is it possible to configure the authentication response to ...
Read more >AWS Cognito with HttpOnly Cookie - Medium
AWS Services are great, but around cognito there isn't a clear documentation or indications when it comes to HttpOnly cookies.
Read more >A secure http only cookie based approach to using AWS Amplify
This library was created the address the issues found here. Basically this will avoid using client side cookies and local storage by using ......
Read more >CookieStorage (JxBrowser 6.23.1 API) - TeamDev
Deletes one specific cookie . int, deleteAll(). Deletes all of the cookies including session, secure or HTTP only cookies. java ...
Read more >Using HTTP cookies - MDN Web Docs
For example, cookies that persist in server-side sessions don't need to be available to JavaScript and should have the HttpOnly attribute. This ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I would just like to say that this issue is one of the biggest reasons my company is considering the removal of Cognito from our stack (and not being able to set session expiration for less than a day). If there’s anything I can do to elevate the priority of this issue, let me know because I’d love to avoid the pain of migrating away.
Im very surprised this is the only issue in this repo I’m finding regarding the security of a web app using Amplify.
LocalStorage (which seems to be currently used) is definitely not secure from XSS attacks.