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.
Re-map default Identity Endpoints in Core App (Razor)
Joshy507
20
Reputation points
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.
My main question is how can I re-map the pages from "/Identity" to "/" (just for testing purposes for now)?
Currently:
Wanted:
I did try adding "app.MapGroup("/").MapIdentityApi<IdentityUser>();" after my "app.UseAuthorization();", but it didn't seem to do anything.
Is this the proper way of re-routing the pages? This MapGroup line didn't appear to make any difference.
Thanks,
Josh