How Interceptors implement Refresh Tokens EASILY In Angular!
How Interceptors easily implement Refresh Tokens in Angular!
Using refresh tokens with json web tokens is a great way to keep your application a bit more secure. What happens though when your client side is trying to access api resources and you keep receiving 401 errors? Well in this case we need to try and get new tokens for the user, but without causing them the hassle of them needing to sign in. So in Angular we can leverage the power of interceptors to automatically attempt to get new tokens for the user and conveniently keep them in the application. So in this video i want to show you guys all the frontend code needed to make that work in an interceptor. We are using the same Angular app from the previous tutorials and if you haven't seen those other videos the link is below.
JWTClientYT Repo: https://github.com/israelquiroz93/JWT...
JWT Auth Playlist: • JWT Authentication & Authorization
Support Me On Patreon: / israelquiroz
Follow Me On TikTok: https://www.tiktok.com/@israelquiroz9...
All My Links Here: https://linktr.ee/israelquiroz
#RefreshTokens #Angular #Interceptor
TimeStamps
----------------------------
00:00 Intro
00:22 Creating the Interceptor File
00:34 What Are Interceptors Used For?
01:17 Explaining The Project We Are Using
02:50 Coding The Interceptor To Work With Refresh Tokens
07:37 Testing The Refresh Tokens & Interceptor
Watch video How Interceptors EASILY implement Refresh Tokens in Angular! online without registration, duration hours minute second in high quality. This video was added by user Israel Quiroz 07 February 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 8,104 once and liked it 136 people.