Open anthonychu opened 3 years ago
Moving this to 107 and scheduling time with @anthonychu to get this pushed out
@anthonychu are you blocking some time for us to follow up on this?
@anthonychu are we OK to close this after our last sync? The SWA team will be taking ownership of this moving forward, right?
@fabiocav @anthonychu any updates, can we close the issue?
What is the current status of this package? I'm in the process of attempting to integrate security with my Blazor application. I've been interested in doing this since @anthonychu original blog post on this subject. This looks like the package I need.
Thanks
This now needs to be updated to .NET 6.
+ @thomasgauvin @Reshmi-Sriram to review and prioritize.
@anthonychu
I thought this may be valuable to document some place but could not find an appropriate place for it. It's a bit out of place in the PWA documentation and the Static Web Apps Authentication and Authorization documentation. I'm hoping you could direct this to the appropriate people.
I ran across an issue when integrating my app. I made my changes based on the Client app in the example supplied here and Simple demo. I tested it locally with the SWA CLI locally and everything worked as expected.
I deployed the application and started testing. But when I clicked on one of the providers, the browser would refresh and the app would show Sorry, there's nothing at this address. There was no login prompt for the selected provider.
My issue was that my Client app is a PWA. The easyAuth logins are server rendered and I needed to change the service-worker-published.js file. I found the guidance for the change in the here.
Locate the following code in service-worker.published.js
:
const shouldServeIndexHtml = event.request.mode === 'navigate';
Change the code to to the following:
const shouldServeIndexHtml = event.request.mode === 'navigate'
&& !event.request.url.includes('/.auth/');
@anthonychu, any update when can we expect a released version of Microsoft.Azure.AppService.Authentication.WebAssembly.
Our use case is you use Blazor WebAssembly + Edge Deployed + Authentication + API Gateway
Currently it's
Microsoft.Azure.Functions.Authentication.WebAssembly
which doesn't reflect that this package is for Static Web Apps (and in the future it could work with Easy Auth on App Service and Functions).