Everything you need to know about the `passport-jwt` Passport JS Strategy (and Angular implementation)
Table of Contents
- What is JWT Based Authentication?
- Review and Preview
- What is a JWT (JSON Web Token)?
- How do I use the
passport-jwt
Strategy?? - Intro to
jsonwebtoken
andpassport-jwt
configuration - What about Angular? How does that handle JWTs?
- JWT Based Authentication Implementation
- Conclusion
What is JWT Based Authentication?
Before I start getting lost in the details, I must mention that if you read my post on the passport-local
authentication strategy, this post will be much much easier! We have already covered a lot of the topics needed to understand how to use the passport-jwt
authentication strategy in that post.
Additionally, as we walk through the basics of JWT authentication, we will start to understand why JWT authentication is far better for Angular front-end applications than session-based authentication (hint: stateless auth!).