Recipe: Login page

Center the AuthForm pattern on a minimal route, handle submission with your API, and surface errors through the built-in alert slot.

Steps

  1. Wrap the page in a centered flex container with token padding.
  2. Provide onSubmit that calls your auth API and throws or sets server errors as needed.
  3. Pass errorMessage when credentials fail so users see inline feedback.

Preview

Welcome back

Sign in to continue with your Spry workspace.

app/login/page.tsx