Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

How to authenticate a Blazor server .NET 8/9 application with Identity Platform?

$
0
0

I'm trying to get Authentication via AzureAD / Identity Platform to work in .NET 8 (or .NET 9 - it just can't be .NET 10).

I've followed the wizard of the connected service for Identity Platform. It created the Azure App and then nothing.

I'm fumbling through the rest. I added the following code into Program.cs:

builder.Services       .AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme);app.UseAuthentication(); app.UseAuthorization();

And that seems to have been accepted now without issue.

The problems:

  • Pages/Authentication.razor complains about a missing reference to Microsoft.AspNetCore.Components.WebAssembly.Authentication I can comment or install that ok.

  • Shared/LoginDisplay.razor complains about the same, fine. But it's also cannot find the SignOutSessionStateManager to inject and I can't figure that one out.

I'm doubting whether this is even still a valid approach.


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>