Do you want to simplify your development process? Grab my free Clean Architecture template here: bit.ly/3Andaly
@BeijoVegan2 ай бұрын
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.
@19balazs862 ай бұрын
JWT is a nice topic, and I can not wait for the continuation of Keycloak.
@MilanJovanovicTech2 ай бұрын
It's scheduled for next Friday :)
@pranikpratik2 ай бұрын
You sound calm now. It’s great content, Keep it up.
@MilanJovanovicTech2 ай бұрын
It varies based on how many coffees I had prior ☕☕
@shanabunny2 ай бұрын
I was just about to implement it. Perfect timing thank you.
@MilanJovanovicTech2 ай бұрын
Perfect! 😁
@iq4u2132 ай бұрын
Awesome video ! next video should be about Refresh Token
@MilanJovanovicTech2 ай бұрын
Good idea, actually!
@enricoroselino75572 ай бұрын
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 ?
@MilanJovanovicTech2 ай бұрын
You can add the roles as claims on the JWT, it's pretty simple. You then use these claims to implement an authorization policy.
@ukgames304d2 ай бұрын
please Milan make a video about implementing refresh token :)
@MilanJovanovicTech2 ай бұрын
All right, all right
@Credi64642 ай бұрын
Pure gold content! Thanks for that!
@MilanJovanovicTech2 ай бұрын
Glad it was helpful!
@EzequielRegaldo2 ай бұрын
Awesome, your tutorials are the best !
@MilanJovanovicTech2 ай бұрын
Thanks a lot!
@vbachris2 ай бұрын
2 added bonus material? 1) token refresh 2) in conjunction with EntraID
@MilanJovanovicTech2 ай бұрын
Good suggestions for future videos
@isahirzm2 ай бұрын
Great tutorial, when it comes to consume the API, what would be the best practices to do on the consumer(front-end)
@MilanJovanovicTech2 ай бұрын
As in where to store the JWT?
@isahirzm2 ай бұрын
@@MilanJovanovicTech yes
@asesorwebvideos2 ай бұрын
gracias saludos desde CHILE
@MilanJovanovicTech2 ай бұрын
Many thanks!
@s.a.h.i1261Ай бұрын
Would love to see a video on how to protect this system additionally from CSRF attacks
@MilanJovanovicTechАй бұрын
Good suggestion
@ALOKSHARMAMD2 ай бұрын
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?
@MilanJovanovicTech2 ай бұрын
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
@Arshaad7860002 ай бұрын
this is brilliant. can you show us how to implement something like this with microsoft identity and roles
@MilanJovanovicTech2 ай бұрын
Will do
@davidespada012 ай бұрын
thank you can you show us how to consume the JWT token with validating
@MilanJovanovicTech2 ай бұрын
What do you mean by this?
@EzequielRegaldo2 ай бұрын
When you use Auth required in some route its automatically validated. Library does it for you
@EzequielRegaldo2 ай бұрын
@@MilanJovanovicTech maybe caducation or refreshing
@davidespada012 ай бұрын
@@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
@WangAndrew2 ай бұрын
how do you validate the jwt token on the client side, if blazor wasm ?
@MilanJovanovicTech2 ай бұрын
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.
@WangAndrew2 ай бұрын
@@MilanJovanovicTech what if the server side use ‘asymmetric’ then the client side only need the public key not the private key
@abdullahm.33632 ай бұрын
Great video, how to create a refresh token, so the user don't have to login again and again.
@MilanJovanovicTech2 ай бұрын
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-ef9yt2 ай бұрын
Thanks@@MilanJovanovicTech
@agusbudianto44732 ай бұрын
Hi Milan, how to integrate this JWT token with SignInManager in Identitiy Core
@MilanJovanovicTech2 ай бұрын
Use SignInManager to verify password, and then generate a JWT and return it
@theeusftn2 ай бұрын
can you teach how to make hmac authentication?
@MilanJovanovicTech2 ай бұрын
Sure
@denisgudiel55742 ай бұрын
Is the Manger user secrets more secure than the appsettings?
@MilanJovanovicTech2 ай бұрын
I didn't quite understand you there
@denisgudiel55742 ай бұрын
@@MilanJovanovicTech is that you use the "Manager user secrets" to save the jwt key
@VishalYadav-oq9if2 ай бұрын
Awesome 👍
@MilanJovanovicTech2 ай бұрын
Thank you! Cheers!
@omidkianifar51442 ай бұрын
Continue Keycloak series plz
@MilanJovanovicTech2 ай бұрын
Next week (schedueld for Friday)
@omidkianifar51442 ай бұрын
@@MilanJovanovicTech 😍
@dhmilmile12 ай бұрын
How can we implement refresh token?
@istovall26242 ай бұрын
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.
@MilanJovanovicTech2 ай бұрын
There you go 😁
@ojhkhofdgfd2 ай бұрын
@@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?
@dhmilmile12 ай бұрын
@@istovall2624 got it thanks
@MahmoudSaed9818 күн бұрын
Milan please we want a video about Refresh Token
@MilanJovanovicTech18 күн бұрын
Recorded, releasing soon
@MahmoudSaed9817 күн бұрын
@@MilanJovanovicTech Thank you very much
@СтасСеверин-н9й2 ай бұрын
Where can i download this code?
@MilanJovanovicTech2 ай бұрын
This code on www.patreon.com/milanjovanovic But also try this :) www.milanjovanovic.tech/templates/clean-architecture
@АлексейАнтонов-ф5ш2 ай бұрын
Do something about external signin, like facebook, google, etc.
@MilanJovanovicTech2 ай бұрын
Good suggestions
@RicusNortje2 ай бұрын
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
@MilanJovanovicTech2 ай бұрын
Yes!
@tumers.1595Ай бұрын
Good tutorial. But it seems to write all the codes into memory. It seems unrealistic and insincere to me.