Skip to content

JWT token not cleared out from axios headers on logout #296

Open
@ghost

Description

Hello,
I noticed that the Authorization header (containing the JWT token) is still present on the next calls just after the logout.

Here are the step to reproduce :

  • Login with an existing user ;
  • Navigate to produce a call to backend -> the Authorization header is set : OK.
  • Go to settings and Logout -> The token is destroyed from the localStorage : OK.
  • Don't refresh/reload the page your browser.
  • Navigate to produce a call to backend -> the Authorization header is set : NOK.

The headers should be discarded / cleaned out after logout.
As the actions are disabled when the currentUser is not set (and that's correctly done on logout), the impact is low, but this stays quite unsecure.

Thanks a lot for this great example project!

Gerfaut

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