Share via

Blazor WASM redirect to page not found after login from OIDC

Moeen Uddin 0 Reputation points
2024-02-21T10:26:13.1233333+00:00

I have a Blazor WASM app, and i am using IDS(Identity Server) for authorization. After the successful login from IDS i get redirected back to app with the error message "Sorry, there's nothing at this address." User's image

I have setup @attribute [Authorize] on a Counter page for testing but same happens if i use it on Home page. Basiclly this is the message from Router.NotFound component There has been a fix for this here WASM Redirect not working I have tried this but still redirect goes to NotFound This is my redirect uri setting "RedirectUri": "https://localhost:7095/signin-oidc" Redirect uri and grant types is setup on both client and server.

Developer technologies | .NET | Blazor
Developer technologies | C#
Developer technologies | C#

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.


2 answers

Sort by: Most helpful
  1. Joseph Wery 0 Reputation points
    2024-02-21T13:55:49.4166667+00:00

    Double-check your authentication configuration in your Blazor WASM app, particularly the OIDC options. Make sure that the authority, client ID, and other parameters are correctly configured to match your OIDC provider settings.

    1. Handle Navigation: Ensure that your Blazor app properly handles navigation after authentication. After successful authentication, the OIDC middleware will redirect the user back to your application for Mazer Zone escape room camden. Make sure your application redirects the user to the correct page or route after authentication.

    Was this answer helpful?

    0 comments No comments

  2. Moeen Uddin 0 Reputation points
    2024-02-21T12:50:15.3566667+00:00

    I got my answer, i was using wrong redirect url. Correct one: "RedirectUri": "https://localhost:7095/authentication/login-callback" I was using "RedirectUri": "https://localhost:7095/signin-oidc"

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.