Re-map default Identity Endpoints in Core App (Razor)

Joshy507 20 Reputation points
2024-12-28T19:33:57.36+00:00

I've added the default Indentity pages for an .Net Core 8 Razor application and everything appears to be working fine with the Account pages.

User's image My main question is how can I re-map the pages from "/Identity" to "/" (just for testing purposes for now)?

Currently:User's image

Wanted:

User's image

I did try adding "app.MapGroup("/").MapIdentityApi<IdentityUser>();" after my "app.UseAuthorization();", but it didn't seem to do anything.

User's image

Is this the proper way of re-routing the pages? This MapGroup line didn't appear to make any difference.

Thanks,

Josh

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,713 questions
{count} votes

Accepted answer
  1. Bruce (SqlWork.com) 68,801 Reputation points
    2024-12-29T18:03:22.2533333+00:00

    Microsoft identity is implemented as razor pages. It is hard coded to the area identity. It currently is not configurable. You will need to scaffold the pages and change their routing by editing the pages. you will also need to edit the login cookie options LoginPath and LogoutPath parameters to match.

    0 comments No comments

0 additional answers

Sort by: Most helpful

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.