JavaScript Edu Resources. Angular Courses. React Tutorials. Join us!


Library for sending authenticated HTTP requests and decoding JWTs

  • angular2-jwt is a helper library for working with JWTs in your Angular 2 applications.
  • angular2-jwt is a small and unopinionated library that is useful for automatically attaching a JSON Web Token (JWT) as an header when making HTTP requests from an Angular 2 app.
  • Those details will vary depending on your setup, but in most cases, you will use a regular HTTP request to authenticate your users and then save their JWTs in local storage or in a cookie if successful.
  • If you wish to only send a JWT on a specific HTTP request, you can use the class.
  • This can be useful for cases where you want to make HTTP requests out of observable streams.