Mastering .NET 8 Blazor Cookie Authentication & Authorization with Individual Accounts! 💻🚀
ฝัง
- เผยแพร่เมื่อ 8 ก.พ. 2025
- Are you looking for Coding Mentoring? If you're seeking personalized guidance and mentoring for your coding journey, then get in touch!. I offer expert guidance and support to help you level up your programming skills. Contact me on business.netcodehub@gmail.com to book a session and accelerate your coding career.
/*Get Source Code From GitHub*/
github.com/Net...
Here's a follow-up section to encourage engagement and support for Netcode-Hub:
🌟 Get in touch with Netcode-Hub! 📫
🔹 GitHub: (github.com/Net...) 🌐
🔹 Twitter: ( / netcodehub ) 🐦
🔹 Facebook: ( / netcodehub ) 📘
🔹 LinkedIn: ( / netcode-hub-90b188258 ) 🔗
🔹 Email: [business.netcodehub@gmail.com]📧
☕️ If you've found value in Netcode-Hub's work, consider supporting the channel with a coffee!
🔹Buy Me a Coffee: (www.buymeacoff...) ☕️
It is an excellent video. It allowed me to understand several important concepts. Thank you.
Glad it was helpful!
MASTER 🙏🙏. You make it so simple to understand, that's so high, thanks 👍🏽
Thanks 😊
I have a question 😁, I would like to know if this authentication method is usable for the whole project (client and server side)? i.e. no need for an API endpoint for authentication(client side)like implementing another API endpoint for the client too? Thanks in advance 🙏
Yes, this works for the server and client.
@@Netcode-Hub thanks 🙏🙏🙏🙏 so much
Thanks for such descriptive video and complete functional code. I cloned the solution from the github repo, however on mac I do not have sql server available easily. So I modified the code to cater for sqlite database instead, and it worked like a charm!
😃
Great content
Thanks
Great video man. Can you make a video about interceptors? A class where all the request are going through and set token as a header for every request. Can i store acces_token in claims to use for my request?
Check the playlist
Have a covered video made
Thank you.
Welcome 🤗
Great video. 1 Question. Where/how would I add custom claims to list?
When preparing the claims to persitAsJson in server project, this where you add all your claims and retrieve them in the client .
nice
Thanks 😊
Thank you for the video. I have individual account cookies for the render mode auto exactly as shown in this video. There are also a few controllers on the server project that are being consumed by the client HttpClient. I tried to put [Authorize (Roles ="Administrators")] on the API controllers but that didn't work. Do I need to configure different authentication schemes for the API controllers and razor pages? Are there any resources you have created?
But do you have that role in place?
Authentication is set once and can be used anywhere .
Make sure your authentication persists in component state when going to the client .
I need this to work on Azure. Have you tried deploying this to Azure?
Not yet
Thank you for your prompt response. I will check back from time to time to see if that changes. All the best. Phil
@philipquarles4679 sure 😃
Thank you very much for your videos, I had a marathon of them but I am facing a problem :( .I need MainLayout to be interactive, it works correctly until I use the "Account" pages, it is because they need a HttpContext and lose interactivity (This is explained in AccountLayout). How can I keep the interactivity of MainLayout? Can you help me please?
Thanks 🙏
Why do you wanna make the layout interactive
@@Netcode-Hub because I want to use NavGroup in my NavMenu and they do not expand. I also want to be able to use the button to change the theme located in the AppBaar, also a button to expand and hide the NavMenu.Thanks to you, sorry for my English.
@@Netcode-Hub because in the appBar I want to keep working the button to change the theme, also the button that expands the NavMenu, also the NavMenu groups (NavGroup) are not expanded in the "Account" pages. Help me pls.
@@Netcode-Hub because in the appBar I want to keep working the button to change the theme, also the button that expands the NavMenu, also the NavMenu groups (NavGroup) are not expanded in the "Account" pages. Help me pls. :(
can you create for razor pages instead of blazor
With .NET 8. Blazor with individual account ?
For some reason, which I can not figure out, when I use the Blazor wep app template and choosing Interactive render mode Auto(Server and WebAssembly) the template don't create two projects, it does not create the client project. did they change the template or something ?
Change project folder location , shorten the project name… it might be too long , it might work
@@Netcode-Hub
Yeah I figures out my project name was to long. I never seen that before.
Keep it in mind next time