Blazor, API, and role based Authorization

Hi
I about to build a .Net Blazor Server application.
That application then calls a .Net API.

I need authorization in the app and API.
Like “Admin”, “Customer”, “IT”, etc.
So they see different things in the app, and are restricted to what they can call in the API.

Would Roles be the way to go?

In .Net role based authorization you can use the Authorize data annotation.

Should i implement it like this tutorial? With customize the token on login?

Or what would be a good solution?

Regards
Jakob

Hey there!

Unfortunately we won’t be able to help you with that article as it wasn’t developed by us so it’s hard to share advice on a product that you haven’t invented but we can of course try to help you. Can I redirect you to a better place and ask you to ask this question in on of those threads? Thank you!

Thanks for the reply

I will try using action

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.