Skip to content

Blazor RemoteAuthenticatorView OnLogInSucceeded event firing three times instead of once #29235

@mattruma

Description

@mattruma

Describe the bug

I created a Blazor Web Assembly application that authenticates with Azure AD B2C.

When the user logs in, I call an external API to grab some additional data.

I am noticing the OnLoginSucceeded of RemoteAuthenticatorView component is firing three times, would expect this event to only fire once.

To Reproduce

Here is a what my Authentication Page looks like:

image

UserService is the code that calls the external api.

Here is what the output looks like in the network tab in the browser:

image

Exceptions (if any)

No exceptions are being generated, just excess hits to the API.

Further technical details

Output from dotnet --info follows:

.NET SDK (reflecting any global.json):
Version: 5.0.200-preview.20601.7
Commit: b3b934bbf2

Runtime Environment:
OS Name: Windows
OS Version: 10.0.19042
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\5.0.200-preview.20601.7\

Host (useful for support):
Version: 5.0.1
Commit: b02e13abab

.NET SDKs installed:
2.1.202 [C:\Program Files\dotnet\sdk]
2.1.519 [C:\Program Files\dotnet\sdk]
2.1.616 [C:\Program Files\dotnet\sdk]
2.1.811 [C:\Program Files\dotnet\sdk]
2.2.110 [C:\Program Files\dotnet\sdk]
3.0.103 [C:\Program Files\dotnet\sdk]
3.1.400-preview-015151 [C:\Program Files\dotnet\sdk]
5.0.101 [C:\Program Files\dotnet\sdk]
5.0.200-preview.20601.7 [C:\Program Files\dotnet\sdk]

Metadata

Metadata

Assignees

No one assigned

    Labels

    affected-mediumThis issue impacts approximately half of our customersarea-blazorIncludes: Blazor, Razor ComponentsbugThis issue describes a behavior which is not expected - a bug.feature-blazor-wasmThis issue is related to and / or impacts Blazor WebAssemblyfeature-blazor-wasm-authinvestigateseverity-minorThis label is used by an internal tool

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions