All files / Backend/Middleware JWTcheck.js

0% Statements 0/0
0% Branches 0/0
0% Functions 0/0
0% Lines 0/0

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8               
/*
  Here we are checking for the JWT token, which we
  previously stored in the user's cookies when they logged in.
  If the token is present, we extract the unique user ID from the payload,
  fetch the corresponding user data, and redirect the user to the home page.
*/