Тёмный
Dev Academy
Dev Academy
Dev Academy
Подписаться
Комментарии
@Sreedhar-Berlin
@Sreedhar-Berlin 2 месяца назад
Hey , Great insights…kudos for both of you!
@DevAcademyCom
@DevAcademyCom 2 месяца назад
Thank you! 🔥
@kamranabbasivlogs
@kamranabbasivlogs 3 месяца назад
Very nice
@DevAcademyCom
@DevAcademyCom 3 месяца назад
Thanks! Be sure to check out the new podcast :)
@gametheus1306
@gametheus1306 4 месяца назад
This is like that social engineering shit Pirate Software talks about, never thought about ChatGPT in that light before
@DevAcademyCom
@DevAcademyCom 4 месяца назад
This is a real threat - prompt injection is not easy to prevent
@Xiellion
@Xiellion 4 месяца назад
Gpt isn't the best for code, the highest scoring ai for coding right now is Claude i believe
@DevAcademyCom
@DevAcademyCom 4 месяца назад
Have you tried Cursor ?
@nathanoosterhuis6232
@nathanoosterhuis6232 4 месяца назад
The oldest trick in the book
@DevAcademyCom
@DevAcademyCom 4 месяца назад
Still a very dangerous trick.
@TheeRomanHD55
@TheeRomanHD55 4 месяца назад
Tech is only as smart as people make it
@DevAcademyCom
@DevAcademyCom 4 месяца назад
Yes, that's why *life long learning* is the key.
@sm1166
@sm1166 Год назад
This video was helpful.
@steiner254
@steiner254 Год назад
Interesting
@Matzul98
@Matzul98 Год назад
"Conditional Components Visibility" How is that in terms of performance? Instead of doing ngIf in constructor once, we do checks for each html tag. If I have 100 buttons, I iterate the forRoles() method many times. Thank you for your courses!
@DevAcademyCom
@DevAcademyCom Год назад
Mihai 👋 I am not sure if I understand "iterate the forRoles() method many times". You don't have to check the visibility for each HTML tag. Just apply the directive to the components that require it. Does it make sense?
@berk473
@berk473 Год назад
Great! Clear content
@DevAcademyCom
@DevAcademyCom Год назад
Thank you! 🔥
@berk473
@berk473 Год назад
Very very useful, thank you! I would like a stream every tuesday
@georgegrinding1793
@georgegrinding1793 Год назад
Why can we access styles and script.js at 8081 port from 8080 if it's different origin? And without Access-Control-Allow-Origin: * at 8081 side.
@faizannasimhyder9011
@faizannasimhyder9011 Год назад
Can you please explain, how to add the cors access to the external api while the browser is not blocking on the basis of cors policy. This part was missing in the video.
@DevAcademyCom
@DevAcademyCom Год назад
You mean adding the cors headers on the server-side?
@belalsafy7993
@belalsafy7993 Год назад
Thank you very much, bro ❤
@mathiasabdissamengesha
@mathiasabdissamengesha 2 года назад
Thank you Sir, Mathias from Ethiopia
@DevAcademyCom
@DevAcademyCom 2 года назад
💪😎
@sajeebchandansaha6378
@sajeebchandansaha6378 2 года назад
Great Video. This helped me a lot. Thank you.
@DevAcademyCom
@DevAcademyCom 2 года назад
Great! Did you implement it in your project? :)
@sajeebchandansaha6378
@sajeebchandansaha6378 2 года назад
@Dev Academy Yes. Already and extended it to as per my requirement.
@mrasoft7184
@mrasoft7184 2 года назад
Thank you for your clear explanation regarding the two different ways of authentication over the web applications including its good parts and bad parts.
@DevAcademyCom
@DevAcademyCom 2 года назад
Cool! What are you into next? :)
@yashmathur1389
@yashmathur1389 2 года назад
nice explanation
@DevAcademyCom
@DevAcademyCom 2 года назад
💪💪💪
@irfanbabar8424
@irfanbabar8424 2 года назад
Great Content.
@Haxr-dq6wt
@Haxr-dq6wt 2 года назад
Why do you look like a rectangle?
@DevAcademyCom
@DevAcademyCom 2 года назад
Because I have a masculine face shape, kiddo.
@DanielPradoBurgos
@DanielPradoBurgos 2 года назад
Hey qq, isn't a security hole to store the token where JS can access it?
@DevAcademyCom
@DevAcademyCom 2 года назад
Not really. I explained that in more detail here: dev-academy.com/angular-user-login-and-registration-guide-cookies-and-jwt/
@DanielPradoBurgos
@DanielPradoBurgos 2 года назад
@@DevAcademyCom gotcha, yeah httponly cookies would do the trick perfectly!
@abirabrar3589
@abirabrar3589 2 года назад
Thank you very much for your clear explanation. Take Love from Bangladesh💗
@aayushkubitkar4827
@aayushkubitkar4827 2 года назад
perfect example to explain csrf based attack. I came here to understand the implications of a csrf and I got what I was looking for.
@DevAcademyCom
@DevAcademyCom 2 года назад
🔥🔥🔥
@richardbravix8145
@richardbravix8145 2 года назад
when the refresh token dies the authGard doesn't go back to login page, how can we do that using your code ?
@MsSoldadoRaso
@MsSoldadoRaso 2 года назад
😂😂 I can send any invalid token, and then I intercept the * RESPONSE * traffic from the backend (all this can be done with Burpsuite) then I modify the response as if it were a simple notepad making it look like that token has been valid with a status 200 and also add some valid headers to that response, doing this angular will see that the token has been "valid" and would give me access to pass the Guard. Therefore protecting routes on the client side is not secure. The only thing that can be protected are things on the server side, on the client protecting something is a 💩
@DevAcademyCom
@DevAcademyCom 2 года назад
Yes, that is correct. Who said that this cannot be bypassed? I think you missed the point here. 😋 You can even download the whole JS bundle from the server and read it and stick a "HACKER" on your forehead... 😂
@MsSoldadoRaso
@MsSoldadoRaso 2 года назад
@@DevAcademyCom angular guards its a shit🤣🤣😂
@DevAcademyCom
@DevAcademyCom 2 года назад
It's mainly for UX :-)
@milchstrasse8307
@milchstrasse8307 2 года назад
what frameworks don't sanitizate?
@prajnahegde2200
@prajnahegde2200 2 года назад
How do we make it work?
@DevAcademyCom
@DevAcademyCom 2 года назад
Just do it!
@adityadhanrajtiwari7939
@adityadhanrajtiwari7939 3 года назад
accent is amazing
@DevAcademyCom
@DevAcademyCom 3 года назад
🤡👍
@technicalbabu814
@technicalbabu814 3 года назад
not working bro
@DevAcademyCom
@DevAcademyCom 3 года назад
No problem bro 💪
@bennythazhutha
@bennythazhutha 3 года назад
Hi, this video is amazing. I have only one doubt. when the refresh token is unauthorised or status 401, how or where to handle it ?
@DevAcademyCom
@DevAcademyCom 3 года назад
Hi, what would you like to do then?
@bennythazhutha
@bennythazhutha 3 года назад
@@DevAcademyCom redirect user to login page
@richardbravix8145
@richardbravix8145 2 года назад
@@bennythazhutha did u find out how can u do that ?
@muhammadsherief3684
@muhammadsherief3684 3 года назад
Thanks that helped me a lot!
@DevAcademyCom
@DevAcademyCom 3 года назад
Great! Check wsa.dev 💪
@rohitchettri8812
@rohitchettri8812 3 года назад
Hi Bartosz, Thanks for this content. Also, I am unable to see the newly streamed video on *Role based authentication*. Can you please provide the link or way to access that video.
@DevAcademyCom
@DevAcademyCom 3 года назад
Hey! It will be back soon! 🔥 I want to edit it a little, stay tuned.
@Ravi-fo4kz
@Ravi-fo4kz 3 года назад
Nice 👍
@DevAcademyCom
@DevAcademyCom 3 года назад
Thanks ✌
@swapnanilgupta3046
@swapnanilgupta3046 3 года назад
One question - I can bypass the login screen by creating a Key-Value pair manually in localStorage named JWT_TOKEN. Now I know that the random number API call will fail because the token I have manually created in localStorage will be invalid, but still being able to bypass the login screen like this feels wrong. Is there any better way of implementing the isLoggedIn() method in auth.service?
@STUPIDYOUTUBE_HIDINGMSGS
@STUPIDYOUTUBE_HIDINGMSGS 3 года назад
Very good explanation, I've seen so many but yours is very clear, thanks!
@DevAcademyCom
@DevAcademyCom 3 года назад
Thank you for watching!
@AnkitYadav-xd3pi
@AnkitYadav-xd3pi 3 года назад
Do we need to call service for log out Or we can remove from local storage? 🤔
@lakshmana487
@lakshmana487 3 года назад
Removing from local storage is good enough, because rest services you don't create session on server side.
@swapnanilgupta3046
@swapnanilgupta3046 3 года назад
I think we have to call the logout service, because the way this api is designed, the refresh token needs to be deleted from the server.
@gradientO
@gradientO 3 года назад
From Fireship!
@DevAcademyCom
@DevAcademyCom 3 года назад
Welcome to Dev Academy 💪
@LuisCamberosVids
@LuisCamberosVids 3 года назад
Hi Bartosz, do you have this Role Based access control in Github?
@DevAcademyCom
@DevAcademyCom 3 года назад
You have the same code in the Academy program! :) github.com/bartosz-io/budget-angular github.com/bartosz-io/budget-node
@LuisCamberosVids
@LuisCamberosVids 3 года назад
@@DevAcademyCom Thanks!
@vaibhavarora7782
@vaibhavarora7782 3 года назад
great video. Before spending a day on this, just checked your video, and wow it saved me putting effort + I learned something easily here
@DevAcademyCom
@DevAcademyCom 3 года назад
Great! 🚀
@thienphongvu2452
@thienphongvu2452 3 года назад
Hi, can you share the github
@StijnHommes
@StijnHommes 3 года назад
RU-vid has rules about paid promotion and sponsored content. Stop spamming RU-vid with adverts for PWA nonsense.
@DevAcademyCom
@DevAcademyCom 3 года назад
Are you ok?
@janedoe1771
@janedoe1771 3 года назад
Either he doesn't grasp the power of pwa's or the man is a native dev and DOES grasp it...
@orionrush
@orionrush 3 года назад
​@@DevAcademyCom ​ he seems to be out on a one-man mission against PWAs as he left some choice worked on Maximiliano Firtman's video the other day as well: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-kYAkrgeDLbw.html
@DevAcademyCom
@DevAcademyCom 3 года назад
😂
@StijnHommes
@StijnHommes 3 года назад
@@orionrush PWA helps lazy coders but offers no advantages for end users like me. Sure, I could "install" your "app" from a random website, but why should I when we've been taught for years to only install apps from the store? Stores might not be perfect, but they keep out at least some of the malware. We need a gatekeeper or paywall of some sort to keep malware out of the ecosystem. Not promote technology that allows it to spread. Also, building everything on the same code base and working web-first means desktop users get an inferior experience as most developers never get past the phone UI/UX design. I'm not using PWAs until developers stop jumping on the bandwagon and start thinking about end users and security instead of their own convenience.
@deepakverma-uo7pf
@deepakverma-uo7pf 3 года назад
How to get sir source code......
@andreasmerkle1011
@andreasmerkle1011 3 года назад
Isn't there something missing in "handle401Error ()"? If the API returns a 401 at "refreshToken" -> shouldn't that be caught - so that you can show an error message in the application? And shouldn't "isRefreshing" be set to false again?
@mryassine7221
@mryassine7221 3 года назад
I from Morocco 🇲🇦
@pankajchaturvedi3176
@pankajchaturvedi3176 3 года назад
India
@juanchox0929
@juanchox0929 3 года назад
Excellent video! Thanks a lot for sharing your knowledge. I'll use this on a personal project
@developershive
@developershive 3 года назад
A quick Angular library for keycloak integration is developershive.com/libraries/ng-keycloak/
@mauriceemmanuel5251
@mauriceemmanuel5251 3 года назад
loved this ❤️❤️
@michaelk7886
@michaelk7886 3 года назад
Great video, thanks a lot! When the refreshToken() gets an HTTP 401 I would like to logout the user and redirect to the login page. Does anybody know how to do this? I have tried with no success. Since token.interceptor has the method handle401Error() I suppose it should be there. Any help is appreciated....
@pipacs_o1962
@pipacs_o1962 3 года назад
In the handle401error function after the switchMap use catchError and if the error status is 401 you can delete everything from localstorage and use router to redirect to login page. If you use refreshtoken which will be invalid after logout then you should delete it from the db.
@michaelk7886
@michaelk7886 3 года назад
@@pipacs_o1962 Thank you for your help. It is working now!
@sarazaidi2771
@sarazaidi2771 3 года назад
@@pipacs_o1962 can you show me the code for this? return this.auth.refreshToken() .pipe(switchMap((newToken: string) => { // did we get a new token retry previous request debugger this.isRefreshingToken=false; console.log(newToken); this.tokenSubject.next(newToken); // return next.handle(this.setTokenInHeaders(req, newToken, baseUrl)); return next.handle(this.setTokenInHeaders(request, newToken, baseUrl)); }), catchError(error =>{ if(error.status == 401){ localStorage.removeItem('token'); localStorage.removeItem('refreshtoken'); localStorage.removeItem('menu'); localStorage.removeItem('pref'); localStorage.removeItem('username'); this.globals.changeSharedData({ showLogin: true }); this.router.navigate(['/login']); return Observable.throw('error is caught'); } else{ return throwError('error is thrown'+error) } }) ); } trying this but the error is always thrown. It is not catching the error