Angular Authentication: Role Based Authorization

preview_player
Показать описание
#Angular uses guards to protect routes. In this video we will use the CanActivate guard to protect routes from non-authorized users.

The authentication is applied using #jwt token and we will make sure to block users from visiting specific routes if they are not authorized.

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

This is my first time building a Internet application (im a junior front end dev). Normaly we only do intranet applications but this series has helped me much to get in touch with JWT Interceptors and a basic login system. THANK YOU SO

MhmmDonuts
Автор

Great Video! However I have a question... What do you think about sending /get-profile request to the API and storing user data using behaviour subject? Wouldn't that be as good?

zura
Автор

Excellent, Very simple and straight to the point. Thanks

samitdigitalart
Автор

as usual brief and exactly to the point

aaelborollosy
Автор

Just wants to say thank you, saved my semester ❤

ziadnajami
Автор

Is it necessary to decode the way you did the role info from token, why don't just send the serialised object from server. Personally I don't like accessing info by using index signatures 😜

In addition I want to learn is it safe to store role in the local storage?

Otherwise thanks for the video

SamiullahKhan
Автор

Greet video! Thnx!
What theme you use in VSCode?

curtismaple
Автор

Nice technique to parse the allowed roles from the access token.

ThomasBurleson
Автор

Great content. May I know extension to create component and guards?

mrengithm
Автор

Fantastic explanation awaiting for many more

saurabhchauhan
Автор

Brilliant! What happens when you have several roles that require access? My role setup isn't hierarchical .

cholasimmons
Автор

Great video! Managed to do it thanks to you :D Thanks a lot for the content once more!

felixjimenezgonzalez
Автор

Great video, really helped me to understand the concept.

maheshkala
Автор

Great, kindly upload Oauth validations, OKTA like that

priyankaravichandran
Автор

great video for us we wait others thanks

ElmarAmanov
Автор

What plug in are you using in viscose for schematics?

rconr
Автор

What is the syntax to allow more than one role to access the page?

alessandrocinque
Автор

can you do a video where the admin sees a different navigation bar then the user?

murinho
Автор

Hi
After that how to hide components based on role provided in route of data

gibranaakib
Автор

hi in the guard file the window.alert or the console.log doesnt work it doesnt respond with anything also the guard works but with every role no matter if youre the admin you stilld ont get access to the guarded component

asjadbutt