berhir / BlazorWebAssemblyCookieAuth

This sample shows how to secure a Blazor WebAssembly application with cookie authentication. It uses OpenID Connect to request security tokens and ProxyKit to forward request to a REST API.
57 stars 11 forks source link

Refactor for Blazor 3.2.1 #1

Closed joshua-phillips closed 3 years ago

joshua-phillips commented 4 years ago

Hi, @berhir, first, thanks for your work on this. I've recently been exposed to Blazor and I've been struggling with authentication/authorization. Your project runs flawlessly as-is with the preview version, but Blazor is now in general availability and it seems more than a few things have changed.

If I try updating your project to use version 3.2.1, it seems like there's an issue injecting an HttpClient into the HostAuthenticationStateProvider. I'm not sure if it's a change with the lifecycle or something else. I'm wondering if you've had the chance to revisit this recently and what your thoughts are on how to get this working in the latest Blazor version.

Thanks!

berhir commented 4 years ago

Hi, I have updated the sample to the latest stable version of Blazor. And I have created a branch for .NET 5: https://github.com/berhir/BlazorWebAssemblyCookieAuth/tree/net5

Let me know if it works for you

joshua-phillips commented 4 years ago

Hi, @berhir, I'm planning to check it out this weekend. Thanks so much for you work on this!

berhir commented 3 years ago

@joshua-phillips I am closing this issue. if you have any issues, feel free to open a new one