Skip to content

token storage: change needed #2

Description

@du2x

Token is stored with localstorage. It happens that since localstorage is accessible through javascript from same domain, the token is vulnerable and a XSS attack can occur.

The best way to store the token is with cookie flagged with httpOnly and secure. httpOnly sets the cookie to be read only on server side. secure sets the cookie to be transfered only under https protocol.

Furthermore, the XSRF attack needs to be avoided with X-XSRF-TOKEN.

Read more: https://stormpath.com/blog/where-to-store-your-jwts-cookies-vs-html5-web-storage/

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions