Do you want to simplify your development process? Grab my free Clean Architecture template here: bit.ly/3Andaly
@BeijoVegan4 ай бұрын
Can I make a suggestion? Please, use some kind of editing software that zoom in where you click with the mouse. It's very hard to follow your coding on mobile phones.
@19balazs864 ай бұрын
JWT is a nice topic, and I can not wait for the continuation of Keycloak.
@MilanJovanovicTech4 ай бұрын
It's scheduled for next Friday :)
@dobjekАй бұрын
Thanks!
@MilanJovanovicTechАй бұрын
Much appreciated!
@pratikpandya23064 ай бұрын
You sound calm now. It’s great content, Keep it up.
@MilanJovanovicTech4 ай бұрын
It varies based on how many coffees I had prior ☕☕
@shanabunny4 ай бұрын
I was just about to implement it. Perfect timing thank you.
@MilanJovanovicTech4 ай бұрын
Perfect! 😁
@Credi64644 ай бұрын
Pure gold content! Thanks for that!
@MilanJovanovicTech4 ай бұрын
Glad it was helpful!
@EzequielRegaldo4 ай бұрын
Awesome, your tutorials are the best !
@MilanJovanovicTech4 ай бұрын
Thanks a lot!
@vbachris4 ай бұрын
2 added bonus material? 1) token refresh 2) in conjunction with EntraID
@MilanJovanovicTech4 ай бұрын
Good suggestions for future videos
@iq4u2134 ай бұрын
Awesome video ! next video should be about Refresh Token
@MilanJovanovicTech4 ай бұрын
Good idea, actually!
@ukgames304d4 ай бұрын
please Milan make a video about implementing refresh token :)
@MilanJovanovicTech4 ай бұрын
All right, all right
@dobjekАй бұрын
Thanks Milan, excellent tutorial as always! Works as a charm out of box. How about next video of token expriration scenario as well as basic roles support? Coffee tips will be provided ;)
@MilanJovanovicTechАй бұрын
I'm releasing a video about refresh tokens very soon! And then extending this with some baked in AuthZ support won't be too difficult.
@MarvinKleinMusicАй бұрын
I really wish you would have showed the concept of refresh tokens here as well
@MilanJovanovicTechАй бұрын
Have a video coming up on that!
@enricoroselino75574 ай бұрын
great video as always, do you have any tips on implementing role based access control using jwt ? or i shouldnt implement it inside jwt in the first place ?
@MilanJovanovicTech4 ай бұрын
You can add the roles as claims on the JWT, it's pretty simple. You then use these claims to implement an authorization policy.
@davidespada014 ай бұрын
thank you can you show us how to consume the JWT token with validating
@MilanJovanovicTech4 ай бұрын
What do you mean by this?
@EzequielRegaldo4 ай бұрын
When you use Auth required in some route its automatically validated. Library does it for you
@EzequielRegaldo4 ай бұрын
@@MilanJovanovicTech maybe caducation or refreshing
@davidespada014 ай бұрын
@@MilanJovanovicTech sorry i was not clear, i meant if i have an api application that will get jwt from other application and use it for further api calls what if i need to validate that jwt 1st in case it was encrypted Thank you ,, your amazing
@isahirzm4 ай бұрын
Great tutorial, when it comes to consume the API, what would be the best practices to do on the consumer(front-end)
@MilanJovanovicTech4 ай бұрын
As in where to store the JWT?
@isahirzm4 ай бұрын
@@MilanJovanovicTech yes
@ALOKSHARMAMD4 ай бұрын
do you have any videos explaining tools like open telemetry, application insights, grafana etc with dotnet. i have been going through different tools to implement in-app profiler for potential memory leaks handling and its very confusing on what to choose to identify & record basic memory/cpu usage for leaks and exceptions etc. As application insight is Azure specific, and other tools are not so easy to add by top attribute. any suggestions which doesn't rely on cloud deployments?
@MilanJovanovicTech4 ай бұрын
Check out the OpenTelemetry video here: kzbin.info/www/bejne/fqO1o31rrLmnms0 You should be able to use the metrics in Aspire to gain some insights
@s.a.h.i12613 ай бұрын
Would love to see a video on how to protect this system additionally from CSRF attacks
@MilanJovanovicTech3 ай бұрын
Good suggestion
@abdullahm.33634 ай бұрын
Great video, how to create a refresh token, so the user don't have to login again and again.
@MilanJovanovicTech4 ай бұрын
You can use a similar approach to here. Just store the refresh token in the DB, and give it a longer lifetime. Then expose an endpoint to send the refresh token in exchange for a new access token.
@Mo-ef9yt4 ай бұрын
Thanks@@MilanJovanovicTech
@WangAndrew4 ай бұрын
how do you validate the jwt token on the client side, if blazor wasm ?
@MilanJovanovicTech4 ай бұрын
I believe you'd need the key to verify the hash, which isn't ideal. But if you just want to parse the content, that's not as hard.
@WangAndrew4 ай бұрын
@@MilanJovanovicTech what if the server side use ‘asymmetric’ then the client side only need the public key not the private key
@agusbudianto44734 ай бұрын
Hi Milan, how to integrate this JWT token with SignInManager in Identitiy Core
@MilanJovanovicTech4 ай бұрын
Use SignInManager to verify password, and then generate a JWT and return it
@denisgudiel55744 ай бұрын
Is the Manger user secrets more secure than the appsettings?
@MilanJovanovicTech4 ай бұрын
I didn't quite understand you there
@denisgudiel55744 ай бұрын
@@MilanJovanovicTech is that you use the "Manager user secrets" to save the jwt key
@theeusftn4 ай бұрын
can you teach how to make hmac authentication?
@MilanJovanovicTech4 ай бұрын
Sure
@asesorwebvideos4 ай бұрын
gracias saludos desde CHILE
@MilanJovanovicTech4 ай бұрын
Many thanks!
@dhmilmile14 ай бұрын
How can we implement refresh token?
@istovall26244 ай бұрын
Do the same thing bit set the refresh token lifespan to longer then send them both. when the jwt expires resubmit them both to reissue. Still validate the jwt but make sure the only part invalid is the expires. Validate the refresh token. If valid and not expired, reissue new jwt.
@MilanJovanovicTech4 ай бұрын
There you go 😁
@ojhkhofdgfd4 ай бұрын
@@MilanJovanovicTech That's a great video! I believe you mentioned it is possible to somehow use the refresh token generated by AddIdentityApiEndpoints Service login endpoint to refresh JWTs?
@dhmilmile14 ай бұрын
@@istovall2624 got it thanks
@Arshaad7860004 ай бұрын
this is brilliant. can you show us how to implement something like this with microsoft identity and roles
@MilanJovanovicTech4 ай бұрын
Will do
@VishalYadav-oq9if4 ай бұрын
Awesome 👍
@MilanJovanovicTech4 ай бұрын
Thank you! Cheers!
@omidkianifar51444 ай бұрын
Continue Keycloak series plz
@MilanJovanovicTech4 ай бұрын
Next week (schedueld for Friday)
@omidkianifar51444 ай бұрын
@@MilanJovanovicTech 😍
@АлексейАнтонов-ф5ш4 ай бұрын
Do something about external signin, like facebook, google, etc.
@MilanJovanovicTech4 ай бұрын
Good suggestions
@СтасСеверин-н9й4 ай бұрын
Where can i download this code?
@MilanJovanovicTech4 ай бұрын
This code on www.patreon.com/milanjovanovic But also try this :) www.milanjovanovic.tech/templates/clean-architecture
@esdegan71762 ай бұрын
how if it got stolen?
@MilanJovanovicTech2 ай бұрын
You change the signing secret
@esdegan71762 ай бұрын
@@MilanJovanovicTech with that solution, so if one user got stolen, all user signed outed. which not expected by other user. right?
@RicusNortje4 ай бұрын
Now you don't even need to pass in the user ID on the get user endpoint as you can get it from the JWT subject
@MilanJovanovicTech4 ай бұрын
Yes!
@MahmoudSaed982 ай бұрын
Milan please we want a video about Refresh Token
@MilanJovanovicTech2 ай бұрын
Recorded, releasing soon
@MahmoudSaed982 ай бұрын
@@MilanJovanovicTech Thank you very much
@tumers.15954 ай бұрын
Good tutorial. But it seems to write all the codes into memory. It seems unrealistic and insincere to me.
@MilanJovanovicTech4 ай бұрын
Which part?
@jonchicoineАй бұрын
This doesn't' work that well as a standalone tutorial. imo For anyone familiar with project solution its probably a 10/10.