A custom login page is an application-provided web page where users submit credentials. Spring Security can supply a plain default page, but a custom page fits the application's visual design and can include registration links or login errors. section 5.1 section 5.3.2
A Spring Security custom login page requires these connected pieces:
- Post credentials to /login using fields named username and password unless the processing URL and parameter names are customized. section 5.3.2
Thymeleaf login form
A simple page displays a login heading and image, reports an error when authentication fails, links new users to registration, and posts username and password fields to /login.
A custom page can coexist with third-party authentication. OAuth2 or OpenID Connect can redirect unauthenticated users to a provider, while the page offers a link such as Sign in with Facebook. section 5.3.3
