What Is the Difference Between Sessions and JSON Web Tokens (JWT) Authentication?
Sessions and JSON web tokens (JWT) are the two most common methods of authentication. For Node.js applications. If you are building an ExpressJS login form for example, you will probably choose one of these methods to authenticate users, but may not be sure which one is right for your application.
In this tutorial, we'll learn:
- What is session authentication?
- What are JWTs and how are they used for authentication?
- How are sessions and JWTs different?
- How to choose an authentication method for your project
By the end of this tutorial, you will understand and be able to compare sessions and JWT. And to determine which one you should use for your Node/Express project. This tutorial focuses on username/password type authentication, but the concepts learned apply to other forms as well.
This tutorial is part 5 of 7 tutorials that walk through using Express.js for user authentication.
Sign in with your Osio Labs account
to gain instant access to our entire library.