UNDERSTAND
Bring these concepts with you
BUILD
Your implementation
- Implement logout so repeating it is harmless. Delete the session record identified by the token hash.
- Keep the provided HTTP logout adapter: it revokes server state and sends a clearing cookie using the same name and path.
- Test immediately before expiry and exactly at expiry with the injected clock. This lab has an absolute 60-second lifetime and no refresh-token flow.
function logout(token) {
// Delete server state; unknown tokens should be harmless.
}Need a hint?
- Clearing the browser cookie alone does not revoke a copied token.
- Use now() >= expiresAt to reject the exact expiry boundary. Logging out one session should not accidentally remove another.
Saved on this device · 0 / 6000 · Do not include passwords or private data.
VERIFY
Acceptance checks
From the folder containing your downloaded files, run:
node checks.mjs ./starter.mjs 5This runs checks up to this step. Earlier steps must work first. Mark each result only after checking your implementation; the website does not run or grade it.
Record your attempt to enable the checklist and reference comparison.
Compare with the reference
Attempt the step first, then compare decisions and behavior. There can be more than one correct implementation.
EXPLAIN
Your interviewer asks
How would you implement logout from every device? What changes if the access credential is a signed JWT?
Say your answer aloud, then record the trade-offs and evidence in your notes above.
LOCAL VOICE REHEARSAL
Rehearse your step walkthrough aloud
00:00/ 02:00