79189575

Date: 2024-11-14 16:13:06
Score: 1
Natty:
Report link

Use cookies. When user logs in, send cookie with proper domain with name lets say "auth-cookie". It will contain your jwt token. These cookies will be automatically sent back to you everytime user sends a request. Set httpOnly field to true so that hijacker cannot read the token using javascript. On logout, set the "auth-cookie" cookie to blank.

Reasons:
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Anubhav Sharma