Skip to content

CascadingAuthenticationState not working in Blazor WebAssembly #62280

@adminmngenvmcap066772

Description

@adminmngenvmcap066772

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

In Blazor Standalone Web Assembly project latest version,
After calling NotifyAuthenticationStateChanged in custom AuthenticationStateProvider, clicking another page with

[CascadingParameter]
private Task? _authenticationState { get; set; }

will indicated the user is still not authenticated, even though it is authenticated in NotifyAuthenticationStateChanged event.

As a result, there is no way to check whether the user is authenticated after logged in

Expected Behavior

ser is authenticated after calling NotifyAuthenticationStateChanged

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

9

Anything else?

My MS alias is benyip, you can reach me out in Teams

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-blazorIncludes: Blazor, Razor Components

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions