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.

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,665 questions
C#
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.
11,341 questions
{count} votes

2 answers

Sort by: Most helpful
  1. 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"

    0 comments No comments

  2. 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.
    0 comments No comments

Your answer

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