Blazor Tutorial : Procedural Logic | Authentication & Authorization in C# - EP20

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


In this #Blazor tutorial, I am going to trough steps to show you how you can check if the user is authenticated or authorized or not in C# code.

Content
1. CascadingParameter - AuthenticationState
2. User.Identity.IsAuthenticated
3. User.IsInRole("Publisher")
4. authorizationService.AuthorizeAsync(user, "SeniorEmployee")).Succeeded

Happy Coding!!
Рекомендации по теме
Комментарии
Автор

Thanks for watching, please share with your friends :)

CuriousDrive
Автор

Dear Fahad,
you are one of the best instructors in this field
Thank you very much, and wish you all the best.

talkathiriify
Автор

Love your videos - keep posting please!

crisoxley
Автор

Great Job you are doing. Keep Posting, thanks

svj
Автор

Hi... Great Job... Excellent Tutorial. This is very useful for me. Thank You

vetrijay
Автор

Excellent as always,
Thank you very much indeed.
Best Regards.

talkathiriify
Автор

Hi Fahad... Thanks for such a nice tutorial. Can you kindly recommend a good book to learn blazor ?

umairmasood
Автор

great content, but I could hardly listen to this one because of the microphone picking up keyboard vibrations. It sounded like you were trying to break the keyboard :) But onward to the next video!

jdtracy
Автор

Great video.Can you do a reCaptcha and authenticate with gmail in blazor ?

frattunc
Автор

You will be my hero if you can tell me how to set a global authorized attribute on all pages that start with XXX. I know how to apply it to all pages. Another thing too. If I applied global authorization to all pages in the Startup class, how can I go to an individual razor file and remove it? Then lastly, I'm sorry, does Blazor support beforeEnter hook when the user tries to enter a particular path? I'm trying to learn as much as I can about Blazor. Thanks.

christopherwilliams
Автор

Hello sir,
Thanks for the tutorials.
In my Blazor Project I need to Perform CRUD Operation in Sql Server database using Stored Procedures . But I don't Know how to do. Please Tell me sir

VimalRaj-kidg
Автор

Hello Fahad, good content n nice explanation. I have finished ur blazor server series, and build the application from scratch. Everything is working fine. Just few things I am worried. I have opened multiple tabs after login, I am using localstorage. I signed out from just one tab. Even after that I am able to access the different pages and do the routing in other opened tabs. Api is not getting called is fine because token has got cleared, which is fine. But when I refresh the app gets redirected to sign in page. But is there a way to redirect to sign in page without refreshing the whole page, but instead when ever the user tries to do some navigation.

nasirahmed
Автор

Thanks for the tutorials....When i close the browser without logging out, it take me to the same page the next time i run the application

mohscode
Автор

Please make one video at sessions in blazor.

saeedhargan