Skip to content

Why does the page automatically redirect to "/Account/Login" when the user is not authorized? #58848

@WillowTree1184

Description

@WillowTree1184

I have created a Blazor Web App project in auto render mode and added a nuget package Microsoft.AspNetCore.Authorization in version 8.0.10.

But when I added [Authorize] attribute to my page, I don't know why that it will automatically redirect to "/Account/Login" when the user is not authorized, even though there is no handler for this route. I would like the page to redirect to "/auth/signin" instead, what should I do?

My dotnet version is 8. I develop it in Visual Studio 2022.

Thank you for your time and assistance.

PS: I will upload my code later.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions