Wrap Up
Let's highlight the main contents of this chapter.
We'll cover the following
Key takeaways
Let’s take a moment to reflect on what we’ve learned in this chapter:
- Passport.js is authentication middleware for Node.js. It offers various authentication mechanisms, known as strategies, as individually packaged modules.
- In REST architectures, client-server interactions are typically stateless. The server doesn’t store any history or state about the client session. JWT is a lightweight and secure approach to transferring the state from the client to the server in a REST framework. JWT relies on exchanging encoded and cryptographically signed JSON strings between client and server.
- A user’s password is typically hashed (using a library like
bcrypt
) before being stored in the database for security reasons.
Get hands-on with 1200+ tech skills courses.