What is Blazor? A Tutorial on Building Web Apps with Authentication

Hey @cellaret,
The CallbackPath property is intended to be handled by the OIDC middleware. Its default value is /signin-oidc and you can change it just in case it conflicts with an existing endpoint in your application. Normally you don’t need to change it, and you can’t override its behavior anyway.

If your goal is to redirect the user to a specific page after login, you should specify the redirect URL using the redirectUri parameter.

Referring to the article’s sample project, if you want to redirect your user to the /auth0 page, you need to change the AccessControl.razor component as follows:

<AuthorizeView>
    <Authorized>        
        <a href="logout">Log out</a>
    </Authorized>
    <NotAuthorized>
        <a href="login?redirectUri=/auth0">Log in</a>
    </NotAuthorized>
</AuthorizeView>

I hope everything is clear.

1 Like