Lesson 3.1

Sessions versus JWTs

Server sessions are revocable; JWTs are stateless and awkward to revoke. Pick based on whether you need to log someone out immediately.

Duration
8m
Level
Intermediate
Students
9.2k students

Overview

Server sessions are revocable; JWTs are stateless and awkward to revoke. Pick based on whether you need to log someone out immediately.

In this lesson you will:

  • Compare revocability and statelessness honestly
  • Store tokens in cookies with the right flags
  • Design refresh and logout before you ship

Resources

OWASP Top 10

The official reference for the tools used in this lesson.