-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed as not planned
Labels
βοΈ Resolution: By DesignResolved because the behavior in this issue is the intended design.Resolved because the behavior in this issue is the intended design.Status: Resolvedarea-security
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
The sample RedirectToLogin.razor
component that is linked to in the Blazor MSAL docs is out of date since .NET 7+.
Expected Behavior
Should be update to the following as per the .NET breaking changes doc:
https://learn.microsoft.com/en-us/dotnet/core/compatibility/aspnet-core/7.0/wasm-app-authentication#recommended-action
@inject NavigationManager Navigation
@using Microsoft.AspNetCore.Components.WebAssembly.Authentication
@using Microsoft.Extensions.Options
@inject IOptionsSnapshot<RemoteAuthenticationOptions<ApiAuthorizationProviderOptions>> Options
@code {
protected override void OnInitialized()
{
Navigation.NavigateToLogin(Options.Get(Microsoft.Extensions.Options.Options.DefaultName).AuthenticationPaths.LogInPath);
}
}
Steps To Reproduce
Exceptions (if any)
No response
.NET Version
7+
Anything else?
No response
Copilot
Metadata
Metadata
Assignees
Labels
βοΈ Resolution: By DesignResolved because the behavior in this issue is the intended design.Resolved because the behavior in this issue is the intended design.Status: Resolvedarea-security