Salut, c'est bien de voir un québécois faire ce genre de vidéo ? Ce serait vraiment de voir comment on peux faire le login flow sur mesure sans un pop-up. Ce serait bien de voir un flow qui reste toujours dans l'application. Bonne journée !
Can you please throw some more light onto the last part i.e the user role based authentication that you did? If i have to show/hide a component based on a user role, what all do I need to set up?
Frank thank you for your videos, it is very helpful. It works while I am in the Visual Studio by when I try to move to IIS it fails, do you have any hit?
@@fboucheros Do you know how to set this up with Blazor Server to where I don't have to be authenticated when the site loads? I want to make a blazor server app that works just like you have in the demo. Where you log in when you navigate to the counter page.
Yes. I show how to lock a page at 00:08:21, but if you don't use the "Autorize" attribute the page won't be protected. And pages like login, error, home, about or contact are often public... because you want every one to see them. Good question!
I'm currently working on an existing Blazor WebAssembly Hosted app and trying to implement the Microsoft Identity platform. I've got it to the point where it attempts to log in but it returns an error each time "authorization failed. these requirements were not met: denyanonymousauthorizationrequirement: requires authenticated user". I've been finding that a lot of the documentation and answers on stack overflow tend to focus just of WASM which isn't hosted. Is there a correct way to implement this in a Blazor WASM Hosted application?
Great content.. but I have a question... how to integrate the AAD as in the video, but for "role" data is retrieved and defined via fetching custom backend API? do I have to stick with "create project" with "-au SingleOrg"?
Facing an error while trying to log in: blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. Any idea how to fix this? Thanks!
Great question @Biswameet Hui, yes go in the Azure portal and select the Azure Function or webapp you are trying to reach. From the left menu search for CORS. Add your source url (where are you calling from) and save. It should fix the problem.
Great question @helvio Markman, I did a video very similar to this one on Ch9 (channel9.msdn.com/Series/Azure-Tips-and-Tricks-Static-Web-Apps/How-to-secure-your-C-API-with-Azure-Static-Web-Apps-13-of-16--Azure-Tips-and-Tricks-Static-Web-Apps#time=6m34s) and I show how to create roles in it.
Sorry for the late response. If Visual Studio is up to date you should have the option from the menu. Here a step by step tutorial: dotnet.microsoft.com/en-us/learn/aspnet/blazor-tutorial/intro
Yes the role "Adminiostrator" already exists in Azure Active Directory and because It's my subscription I was already part of it. To see the roles go in the AD inside the portal.
Can you please describe role based authentication? I have added roles in the application manifest. I get the role info in token if I decode it but in authorized view Roles="AssignedRole" always failed.
@@fboucheros github.com/prakash2912/BlazorwithAzureAuth you can find my sample code in the repository and I also mentioned issues I am facing in the readme file. It will be very helpful to me. I tried a lot to resolve the issue but not getting any solution.
@@fboucheros when I tried a simple blazor the Google sign in button appears and works locally, but when deployed to Azure the button doesn't even show up. Can you please make a tutorial on how to do it?
this is very helpful but I have a problem. after logging In, it stuck in loading and I am not able to accept the permission. I tried 3 project but still same behavior. what is the possible problem in my case?