CustomAuthenticationProvider does not work as expected(Does not fire NotifyAuthenticationStateChanged(GetAuthenticationStateAsync()); #41228
Labels
area-blazor
Includes: Blazor, Razor Components
feature-blazor-server
✔️ Resolution: Answered
Resolved because the question asked by the original author has been answered.
question
Status: Resolved
Is there an existing issue for this?
Describe the bug
I am using VS 2022
I than register it program.cs
In my Login Service, i Inject the my CustomAuthStateProvider (showing partial code)
When my API Returns success i call the
await _custAuthProvider.SetAuthInfo(AuthInfo); //This Line is inside of Login Service.
This executes code inside the CustomAuthenticationStateProvide, but no Notification is generated.
I have couple of Places with Authorize View, those don't Update
Expected Behavior
Calling NotifyAuthenticationStateChanged(GetAuthenticationStateAsync());
should update all pages that are using Authorize View to reflect the new State
Steps To Reproduce
Mentioned Above in describe bug
Exceptions (if any)
None
.NET Version
6.0.300-preview.22154.4
Anything else?
C:\Users\nssid>dotnet --info
.NET SDK (reflecting any global.json):
Version: 6.0.300-preview.22154.4
Commit: 1eb22793b6
Runtime Environment:
OS Name: Windows
OS Version: 10.0.22000
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\6.0.300-preview.22154.4\
Host (useful for support):
Version: 6.0.2
Commit: 839cdfb0ec
.NET SDKs installed:
6.0.300-preview.22154.4 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download
The text was updated successfully, but these errors were encountered: