Sign-in, sign-up and recovery screens, ready to wire up.
Keyline is an authentication starter kit in HTML, Bootstrap 5 and vanilla JavaScript. Every screen works today against a demo store, and a single file swaps that store for your API.
Demo account: demo@gmail.com with password edinstack
Screens in the kit
Eight pages, each with loading, error and empty states already handled.
Sign in
Email and password, remember me for 30 days, password visibility toggle, Caps Lock warning, lockout after 5 failed tries.
pages/login.html
Create account
Live validation, password strength meter with a requirement checklist, confirm password, plan picker in pesos, terms checkbox.
pages/register.html
Verify email
Inbox prompt after sign-up or an unverified sign-in, with a resend button on a 60-second cooldown.
pages/verify-email.html
Email verified
Landing page for the link in the email. Handles valid, used and expired links.
pages/email-verified.html
Forgot password
Sends a reset code without revealing whether the email has an account.
pages/forgot-password.html
One-time code
Six-box input with paste and autofill support, 5-minute expiry, resend cooldown, 5 attempts. Used for resets and two-step sign-in.
pages/otp.html
New password
Only opens after a correct code, expires after 15 minutes, signs the account out everywhere on save.
pages/reset-password.html
Account
Protected page with two-step verification switch, remembered device status, plan in pesos and recent sign-in activity.
pages/dashboard.html
Connect it to your backend
The pages never touch storage directly. They call AuthService, so that is the only file you rewrite.
-
Copy the files
Drop
pages/andassets/into your project, or move the markup into your own layout and keep the script tags. -
Replace the service methods
Each method in
assets/js/core/auth-service.jsreturns a Promise. Swap the body for afetchto your API and throw anAuthErrorwith a code the pages already understand. -
Remove the demo inbox
Delete
assets/js/core/demo-inbox.jsand its script tags. Your server sends the real emails. -
Guard pages on the server
The account page check in the browser is a convenience. Protect routes and APIs with your session cookie.
async function login(email, password, remember) {
const res = await fetch('/api/auth/login', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
credentials: 'include',
body: JSON.stringify({ email, password, remember })
});
const data = await res.json();
if (!res.ok) throw new AuthError(data.code, data.message);
return data; // { next: 'dashboard' } or { next: 'otp' }
}