79673615

Date: 2025-06-20 15:12:23
Score: 0.5
Natty:
Report link

Yes, if you allow /token/extend to accept a valid access token and generate a new one indefinitely, a stolen token can be used by an attacker to maintain access forever.Use a Refresh Token mechanism. Access tokens should be short-lived and stateless, while refresh tokens should be securely stored, validated server-side, and rotated to prevent abuse. This ensures that even if an access token is compromised, long-term access is not possible without also stealing the refresh token.

Reasons:
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Chameera