Angular Node MySQL Login System - JWT Interceptor & Auth Guard

preview_player
Показать описание
In this video we will intercept API requests to our Node API with a JWT interceptor to attach the authenticated token to our headers and consequently use this information to protect authenticated routes from being reached with an Auth guard.

--------------------------------------------------
Recommended Udemy courses
--------------------------------------------------

Рекомендации по теме
Комментарии
Автор

Great work !!! This playlist was much helpful

_darshmodi
Автор

Thanks, very helpful series. I'm having trouble persisting the login state. Every time I refresh, the navbar seems to forget that I'm logged in.

julianbullmagic
Автор

such a nice tutorial. thank you very much. i have one question. why is the system logging out after refresh? you login and everything works good. but when i refresh a page it logs out. how can i fix this please

emmanuelmusisi
Автор

my post request for making post is not working even after i have done as same as you

Dr.Wizard
Автор

Hi i have been following along with this unique tutorial and i was wondering, can i use the github files for my own project ? And what else do i need to add to make a project like this production ready ?

DiederickvanZyl-uo
Автор

thanks for this excellent content man!

IMTevinJ
Автор

I also bumped into the same error:


"
This condition will always return 'false' since the types 'number' and 'Pick<User, "id">' have no overlap.
<button *ngIf="post.user === userId" mat-icon-button>
"



The only way I could fix it was the following, I changed:



userId: Pick<User, "id">;

to

userId: User["id"];



I made that change wherever I had the error.



Thanks for the great tutorials! :)

clementH
Автор

Hello, Jon facing same issue return 'false' since the types 'number' and 'pick<User, "id"> i have also changed data type of user fron string to integer and tried == nothing is working bro and also set stricttemplate to false in tsconfig.json
Could u do something and help me out..

_darshmodi
Автор

Isn't it insecure to use LocalStorage?

wishshadow
Автор

Hi Jon, I'm facing a problem I have set tokens to expire in 120 seconds but even after tokens get expired it doesn't automatically logout and I can still visit all routes and make requests.

surajkumarshukla
Автор

hello, this is my first time in learning angular.js and node.js. your tutorial is fantastic. I am just wondering about those errors. How can I throw them to the frontend and alert the proper message and not only the statusCode? for example when you try to login and you enter apassword, it will return error 401:Unauthorozed. how will it return "wrong password!"?

meriejoybigalbal
Автор

Your videos are very good but you could do the put method with sending through the url please, I would appreciate it very much

dannyscord
Автор

Hello Jon, first i want to thank you for this beautiful series! and i would to ask you about an error,
This condition will always return 'false' since the types 'number' and 'Pick<User, "id">' have no overlap.
<button *ngIf="post.user === userId" mat-icon-button>

I searched about this error, and i cannot find any solutions available, please if you can help me and i appreciate that!

abbassalameh
Автор

Thank you Jon for this great series, it has helped me out so much, so thank you, but i am having the same issue as
@Julianbullmagic, every time I refresh the page it logs me out, i have looked at your linkedIn clone project series and GitHub, but i still can't implement it in this project without it erroring out, any suggestions? (This is my first time using angular, typescript, or node, so i'm not very good at this)

JalenBrunsonBurner