Тёмный

Angular JWT Authentication 

Scalable Scripts
Подписаться 34 тыс.
Просмотров 72 тыс.
50% 1

👉 Check our website: scalablescripts.com
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.
Source Code: github.com/scalablescripts/an...
Auth API: github.com/scalablescripts/au...
This video can be combined with other videos:
Angular and Laravel JWT Authentication: • Angular & Laravel JWT ...
Angular and Django JWT Authentication: • Angular & Django JWT A...
Angular and NodeJS JWT Authentication: • Angular & NodeJS JWT A...
Angular and Golang JWT Authentication: • Angular & Golang JWT A...
Angular and NestJS JWT Authentication: • Angular & NestJS JWT A...
Angular and Deno JWT Authentication: • Angular & Deno JWT Aut...
Angular and C# JWT Authentication: • Angular & C# JWT Authe...
Angular and Kotlin JWT Authentication: • Angular & Kotlin JWT A...
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

Опубликовано:

 

28 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 63   
@romanpikulenko
@romanpikulenko 4 месяца назад
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.
@davicampos802
@davicampos802 3 года назад
Best teacher ever , I just love these angular /nestjs tutorials
@pemessh
@pemessh 2 года назад
This channel is soooo underrated. Keep up the great work. Thank you so much for the great content.
@taamcyat
@taamcyat 2 года назад
Exactly what i needed! Great work 👏
@vircycure
@vircycure Год назад
I learnt many things from this video even though I am using angular from few years. Thanks a lot 🎉
@denizyldz1860
@denizyldz1860 2 года назад
Thank you so much! Clear explanation. I really like it
@ardilawar66
@ardilawar66 Год назад
Excellent work! Keep it up!😉
@mike199862
@mike199862 3 года назад
Very useful videos, thank you so much!
@andreyklepikov7084
@andreyklepikov7084 2 года назад
Thank you so much! Great tutorials
@izzyblackout1090
@izzyblackout1090 2 года назад
thank you for this tutorial. Really helpful
@isadora-lt6ns
@isadora-lt6ns Год назад
This video is so good, you helped me a lot!! thank you so much!
@rebecaelida954
@rebecaelida954 Год назад
wow this was very great! thank you so much
@jonathancolorado2998
@jonathancolorado2998 2 года назад
Excelent great Teacher are you. Thanks
@juanarango4917
@juanarango4917 Год назад
really really nice, thanks man!
@amlshohdy6413
@amlshohdy6413 3 года назад
Excellent. You are the best Thanks a lot Can you make a video about auth guard?
@FranBoy7
@FranBoy7 3 года назад
Nice video!!! One question, can you do a route guard? Thanks
@daviddonadze221
@daviddonadze221 2 года назад
Thank you so much
@AboChicheKurdi
@AboChicheKurdi Год назад
can you please explain how to use How can I use cookies sent from backend with the canActive guards ?
@emreaka3965
@emreaka3965 2 года назад
Thanks ^^
@kyleryxn
@kyleryxn 2 года назад
This is great, but I didn't see you use JWT once. The title is very misleading
@user-ns3zu7jc7m
@user-ns3zu7jc7m 3 года назад
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.
@neoszweb
@neoszweb 2 года назад
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?
@aliyahturky5223
@aliyahturky5223 2 года назад
hii did you find a solution for that problem ?
@mcaddit6802
@mcaddit6802 2 года назад
same problem
@netanelarye7547
@netanelarye7547 2 года назад
its help me so much
@pankajpawar2858
@pankajpawar2858 3 года назад
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.
@nedzk
@nedzk 5 месяцев назад
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 ) =(
@chiranshuadik9818
@chiranshuadik9818 3 года назад
Good tutorial! I read that we should not subscribe to EventEmiitters in angular. Can we just use session variables instead? can you please elaborate?
@dhawalparmar7117
@dhawalparmar7117 2 года назад
Yeah you can use localstorage session
@erdavog
@erdavog 6 месяцев назад
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
@mikha2880
@mikha2880 2 года назад
Property 'form' has no initializer and is not definitely assigned in the constructor.
@JEBJOSH
@JEBJOSH 2 года назад
use form!: FormGroup; add the !
@btryx9378
@btryx9378 2 года назад
turn of the strict mode in the tsconfig.json file
@blaze9452
@blaze9452 2 года назад
In 23:30 it does not work with your angular course :(
@zocmihov
@zocmihov 2 года назад
Did you find a solution?
@jawhermahmoudi8649
@jawhermahmoudi8649 2 года назад
thanks
@haruboss_
@haruboss_ 2 года назад
hey, I liked your code extantion for fast development without syntax error, can you please share the name of angular extention with me, please please ..
@skalippanbalippan6972
@skalippanbalippan6972 2 года назад
I am getting this error when I run the cmd: docker exec backend /bin/sh start.sh SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name does not resolve (SQL: select * from information_schema.tables where table_schema = auth and table_name = migrations and table_type = 'BASE TABLE')
@oax97
@oax97 2 года назад
Same here
@rohithkoteval1785
@rohithkoteval1785 Год назад
@@oax97 same here how did you ovecome this?
@aissatouseye1958
@aissatouseye1958 Год назад
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
@thaminduKavinda
@thaminduKavinda 2 года назад
Wow man, these tutorials really help your explanation is very good. keep it up. 🤟 The cookie is not created in the browser (please help)
@isaquiassebastiaomarques2529
@isaquiassebastiaomarques2529 2 года назад
The same with me! Did you found the solution?
@emreaka3965
@emreaka3965 2 года назад
@@isaquiassebastiaomarques2529 backend's and frontend's url scheme must be the same. for example both should be HTTPS or HTTP. If this is not possible, you should set SameSite value to "none".
@user-ob4ve4cv5v
@user-ob4ve4cv5v 2 года назад
After I wrote this.http.post(...) in function submit, I got Unknown Error.
@prashantrao9456
@prashantrao9456 3 года назад
when I login there is no cookie. I have set httponly:true in set_cookie in django. Its working in postman but not Angular. Can you explain why?? And I can see the cookie in network tab and there is a warning with it. which says- this set-cookie didn't specify a samesite attribute and was default to samesite=lax nd was blocked because it came from cross-site response which is not the response to top level navigation.the set cookie had to have been set with samesite=none to enable cross site usage. And I set samesite=None in django.. but still got the same error.
@ScalableScripts
@ScalableScripts 3 года назад
Did you add credentials: true ?
@prashantrao9456
@prashantrao9456 3 года назад
@@ScalableScripts yes... I did the same as you.. And when i run it in Firefox i got the error to add "secure" Parameter in set_cookie. And the previous error is in chrome.
@prashantrao9456
@prashantrao9456 3 года назад
@@ScalableScriptsIt worked....When set SameSite="none" . It had to be in " " .the emitters also working. But still i get no cookies in application tab.
@alexanderpolyakov9217
@alexanderpolyakov9217 3 года назад
I have a similar problem, I don't get cookies on the application tab. go session options: Secure: false, HttpOnly: true, SameSite: http.SameSiteDefaultMode,
@Barricadez
@Barricadez 3 года назад
Yes this is the biggest problem with this code
@emirmustafoski2405
@emirmustafoski2405 3 года назад
Hello, Why we post register to localhost:8000, Everytime i want to register i have Eroror: Connection Refused
@ScalableScripts
@ScalableScripts 3 года назад
You need to build the backend or use the docker container. Check the description of the video and select the backend that you want
@ignacioruiz7094
@ignacioruiz7094 2 года назад
How can I use with canActivate?
@mcaddit6802
@mcaddit6802 2 года назад
is auth guard, have to generate guards
@rezanrasoul2286
@rezanrasoul2286 Год назад
@@mcaddit6802 can you please explain more how can I do that?
@Pelakk
@Pelakk 2 года назад
nie dziala
@NebihTV
@NebihTV 2 года назад
you are 100% albanian
@ahmjksjssd
@ahmjksjssd Год назад
when i use { withCredentials: true } and look the cookies, angular still does not save the coockies i dont know why, any help?
Далее
Django API Authentication using JWT Tokens
37:06
Просмотров 169 тыс.
Angular JWT User Authentication with Tailwind Login🔒
45:32
He turned a baseball into a stylish shoe😱
00:59
Просмотров 399 тыс.
Reactive Form Validation in Angular - Do It Right
13:08
Angular Login using Access & Refresh Tokens
22:44
Просмотров 26 тыс.
The ARCH LINUX Experience
34:30
Просмотров 95 тыс.
JWT Authentication Tutorial - Node.js
27:36
Просмотров 1 млн
JWT Authentication Explained
7:52
Просмотров 21 тыс.
He turned a baseball into a stylish shoe😱
00:59
Просмотров 399 тыс.