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
- Wrap the page in a centered flex container with token padding.
- Provide
onSubmitthat calls your auth API and throws or sets server errors as needed. - Pass
errorMessagewhen credentials fail so users see inline feedback.
Preview
Welcome back
Sign in to continue with your Spry workspace.
app/login/page.tsx