Updating default front-end design of Identity Login Page in .NET core


I am developing a .NET core application with Identity login which provides a Bootstrap form In the /Identity/Account/Login page.

I have imported Materialize CSS files in the wwwroot/lib folder and want to change the Login page's design with materialize css as well.

The problem is /Identity/Account/Login page doesn't exist in project structure. Then how should I approach to solve this problem?

Marko Papic

One way would be to scaffold the login page, which would add it to your project structure. Then you would be able to make any changes you want. You would have to do the following (from the link I provided):

  • From Solution Explorer, right-click on the project > Add > New Scaffolded Item.
  • From the left pane of the Add Scaffold dialog, select Identity > ADD.
  • In the ADD Identity dialog, select the options you want (in your case Login).
    • Select your existing layout page, or your layout file will be overwritten with incorrect markup. When an existing _Layout.cshtml file is selected, it is not overwritten.

For example ~/Pages/Shared/_Layout.cshtml for Razor Pages ~/Views/Shared/_Layout.cshtml for MVC projects

  • To use your existing data context, select at least one file to override. You must select at least one file to add your data context.
    • Select your data context class.
    • Select ADD.
  • To create a new user context and possibly create a custom user class for Identity:
    • Select the + button to create a new Data context class.
    • Select ADD.

Note: If you're creating a new user context, you don't have to select a file to override.

Another way would be to look at the Login page source code and see HTML elements' ids and classes. Then you could override the default CSS by writing your own CSS that would be more specific than the default one.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at


Login to comment


How to set default identity login page in .net core 6 mvc instead of index page in program.cs

.NET Core Identity Login Page handler OnGetAync()

dotnet core authorize always redirect to identity default login page

Asp.net core Identity successful login redirecting back to login page

Using Asp.Net Core Identity in MVC, Authorize attribute is rebouncing to login page after succesfull login

Updating Identity in ASP.NET Core 2.0

Change default identity Login route to something custom asp.net core

ASP.NET Identity - Maintain login after updating user record

.NET Core: How to send to /Account/Login instead of /Identity/Account/Login

Redirecting user to default page after login in ASP.NET Core using Okta

How to change C# Identity Login page default route

Asp.Net Core Identity, updating existing plain text passwords

ASP.NET Identity remember email address on login page

ASP.Net Core Identity login status lost after deploy

Register and Login by Phone Number in Asp.net Core Identity

ASP.NET Core MVC Identity login issue

.Net Core Identity seed data: unable to login using credentials seeded

link to login does not work, in ASP.NET Core Identity UI

External Login without using identity asp.net core 2.0

.Net Core Identity 2 Provider login Cancel leads to unhandled exception

Change identity login URL in ASP.net core 3.0

use existing login table with asp.net core identity service

.net core Identity, getting meaningful login failed reason

Infinite login redirect loop with Google and ASP.NET Core Identity

Customize Login Page design for Authentication type : Individual User account ASP.NET core 2.1, MVC, c#

Variable defined in front end angular is null in net core 2.1

Regex for default ASP.NET Core Identity Password

asp.net core mvc change default Identity area routes

ASP .NET Core Identity default authentication vs JWT authentication

TOP Ranking