Skip to content

Blazor RemoteAuthenticatorView stuck in "Completing login..." after "No matching state found" errorΒ #49221

@Jimmys20

Description

@Jimmys20

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Hello I have a Blazor WASM application that implements OIDC authentication using authentication library. I'm having a problem when users return back to the previous login URL by pressing the browser back button. This issue is described in more detail here: DuendeArchive/identity-model-oidc-client-js#940. Doing some debugging I noticed that indeed I'm getting a "No matching state found in storage" error from Microsoft.AspNetCore.Components.WebAssembly.Authentication/AuthenticationService.js.

No matching state

This is expected behavior because the state is deleted from storage after successful login. What I would like to ask is a way to better handle this error. Right now it gets stuck Completing login... without showing any error to the user or the browser console. I would expect RemoteAuthenticatorView to switch to the LogInFailed RenderFragment and show the error that occurred.

What is the best way to handle this error?

Expected Behavior

No response

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-authIncludes: Authn, Authz, OAuth, OIDC, Bearerinvestigate

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions