Skip to content

Saving API token in the application #1734

@MykytaLiashenko

Description

@MykytaLiashenko

Hello everybody.
A few weeks ago I was writing one small React+Redux application and got stuck with API token safety problem.
I was trying to find the ability to store it somewhere, where nobody can access it, but have no idea how to do this.
It is not good to store token in localStorage or sessionStorage, cause any script have access to it. The same thing with no-httpOnly cookies.
Redux store is not the best place too, cause user will be logged out after every page refresh.
So the question is, what is the best secure place to store API token in React+Redux application?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions