Skip to main content
Consistent, accessible authentication screens. This page covers the interface pattern; it deliberately does not specify an identity provider, which is an application-level decision.

Sign in

A centred card on a muted background.
The registry ships nyuchi-auth-card and nyuchi-auth-layout if you would rather not compose this yourself.

Sign up

The same layout with a name field and a stated password requirement.

One name field

Use a single Full name field. Do not split into first and last, and do not validate its length. See inclusive language for why.

Validation

Show errors inline with FormMessage.

Error handling

Never reveal whether an email exists. “Incorrect email or password” for a failed sign-in; the same confirmation screen on password reset whether or not the address is registered. Distinguishing the two turns a sign-in form into an account-enumeration endpoint.

Accessibility

  • Every input has an associated label.
  • autoComplete on every field, so a password manager can fill it.
  • The form is fully keyboard-navigable.
  • Errors are announced — use aria-live.
  • The submit button shows its loading state.

Sessions

  • Keep session tokens in HTTP-only cookies, not localStorage — a token a script can read is a token an injected script can exfiltrate.
  • Refresh tokens rather than forcing frequent re-authentication.
  • Put a clear sign-out action in the user menu.
  • Confirm before signing out of all devices.

Password reset

  1. The reader selects “Forgot password?” on the sign-in screen.
  2. They enter an email address.
  3. The system sends a reset link — and confirms it did, without saying whether the address was registered.
  4. They follow the link and set a new password.
  5. They are returned to sign in.
Every step uses the same centred card, so the flow reads as one thing rather than four.