Login: Create a Working User Login Page
See the real Demo Projects HQ login flow, from the page form to the shared Security Provider.
See the real Demo Projects HQ login flow, from the page form to the shared Security Provider.
The backend action is app/api/auth/login.json. It accepts username, password, and remember, then runs auth.login with the shared security provider. That provider is defined in app/modules/SecurityProviders/security.json as a Database provider against the users table, with password verification enabled and an admin permission derived from the role column.
That is the modern login mental model to teach: one shared provider, one login action, one page form, and protected routes that reuse the same identity and permission state after sign-in.
Working login flow
Section titled “Working login flow”Start with the shared provider and form wiring, then follow the same identity into protected pages and secure actions.