Session is a way to persist state in an application. Sessions usually have duration and identifiers
A random session identifier. They are unique per session.
Tokens are used for authentication and verification.
Is this user really who they claim to be?
Does this user have permissions to access this resource?
Possession
Inherence
Knowledge
Small chunks of information created by servers to be placed in the client during a session.
Cookies are automatically included in requests performed by the client
Cookies are the preferred way of storing session information
QUESTION: When do you think you should use JWT? What about sessions?
Use JWTs when you need stateless, scalable authentication, like for APIs, SPAs, or microservices. Use sessions when you need server-side security, easy revocation, and fine-grained session control, like in traditional web apps. (SSR?)
— ChatGPT 👀
You know the drill.
How does it work?
Possession
Inherence
Knowledge
What do you think? 🙄
I'm Lucas Castro.
Founding engineer at Trinsic. We help people use digital IDs to get their identity verified online more quickly and securely.
I'm also a husband, father, latter-day saint, gamer, and life-long learner.
lucasamonrc.dev