Project-Stage-Academy / UA-1131_Forum-PS

0 stars 0 forks source link

Implement User Sign Out #7

Open mehalyna opened 8 months ago

mehalyna commented 8 months ago

From Forum-Project-Stage-CC created by mehalyna: Project-Stage-Academy/Forum-Project-Stage-CC#7

Objective: Allow users to log out (sign out) of the application.

Sub-Tasks:

  1. Invalidate JWT on Sign Out:

    • Since JWTs are stateless, consider strategies for invalidating the token on logout, such as a token blacklist or short token lifespan with refresh tokens.
  2. Create Sign Out API Endpoint (Optional):

    • If implementing a token blacklist, develop an endpoint to add the user’s current token to this list upon logout.
  3. Client-Side Token Deletion:

    • Ensure the client application deletes the token upon user logout for security purposes.

US #3