Angular JWT Authentication

preview_player
Показать описание

Learn how to Login securely with Angular. We will Login using JWT( JSON Web Token ) which is the standard method for SPA Authentications. We will not use the traditional "Bearer method" but instead we will login using HttpOnly cookies which is a more secure authentication.

This video can be combined with other videos:

00:00 Preview
01:30 Prebuilt backend
03:56 Installation
05:14 Template
08:16 Navigation
12:23 Register
19:38 Login
23:30 Authenticated User
26:43 Event Emitters
31:18 Logout

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

This is an incredible lesson. I've been looking for information of how to implement angular + django backend authentication for so long and only here I've found a comprehensive instraction and explanation. Thanks to the author.

romanpikulenko
Автор

Best teacher ever, I just love these angular /nestjs tutorials

davicampos
Автор

This channel is soooo underrated. Keep up the great work.
Thank you so much for the great content.

pemessh
Автор

I learnt many things from this video even though I am using angular from few years. Thanks a lot 🎉

vircycure
Автор

Thank you so much! Clear explanation. I really like it

denizyldz
Автор

Very useful videos, thank you so much!

mike
Автор

thank you for this tutorial. Really helpful

izzyblackout
Автор

This video is so good, you helped me a lot!! thank you so much!

isadora-ltns
Автор

wow this was very great! thank you so much

rebecaelida
Автор

Hello. I'm new to Angular. I need to make an asynchronous validator for email on frontend. It will check in the database whether there is a user with such an email or not, if there is, then do not register. I think there should be another @Get('users') method on the backend that returns all users, after which it should be accessed on the frontend? Help me with some advice.

nszujcm
Автор

Excelent great Teacher are you. Thanks

jonathancolorado
Автор

I have a doubt, all of these concepts worked in my localhost, but when I deployed it, the Login Controller (rule that set jwt cookie) doesn't work more. (I receive the cookies "__stripe_sid" and "__stripe_sid" instead jwt token ) =(

nedzk
Автор

Excellent. You are the best
Thanks a lot
Can you make a video about auth guard?

amlshohdy
Автор

can you please explain how to use How can I use cookies sent from backend with the canActive guards ?

AboChicheKurdi
Автор

HI!!, I have a question, when i use postman to test the login it works perfectly, i can see the cookie, but when I tried to login through the front end using angular sending the required data, it works but i could not see the cookie created in the front end port, i followed your tutorial for django and it is the same as yours. Thank you

erdavog
Автор

Nice video!!! One question, can you do a route guard? Thanks

FranBoy
Автор

Awesome Tutorial...
but, i have few questions.
if we store token in httponly cookie then do we need to refresh the token ?
and could you tell that here we using cookie time 1 day This is cookie expiry time, this is not token expiring time,
Because, if i use jwt Token instead of sanctum Token in cookie then which time i used to check validity of token. cookie time or token time ?
And Is sanctum token has no expiring time like JWT Token ?
Pls Answer Thanks.

pankajpawar
Автор

Thank you so much for your tutorials. They are very precious!

It seems when I try to call the /api/user endpoint, the cookie is not correctly retrieved from the request and it returns null all the time.
Any idea?

neoszweb
Автор

when i set with credential to true i had cors errors. I dont have solved it yet . Then i used HttpClient, and Headers but i have 400 error code . But i my postman login the token comes but not in my angular projet . my mind is aching, can you please help me out

aissatouseye
Автор

Good tutorial!
I read that we should not subscribe to EventEmiitters in angular.
Can we just use session variables instead?
can you please elaborate?

chiranshuadik