Email & Password
For most buyers, this is the first auth flow to verify.
NuxtBase supports standard credential auth, but the shipped behavior is more opinionated than “email + password and you are in”. The template requires email verification before protected app access and uses confirmation pages to keep the flow clear.
What the Shipped Flow Looks Like
Section titled “What the Shipped Flow Looks Like”Registration
Section titled “Registration”On /register, the user can create an account with:
- full name
- password
- password confirmation
Key rules from the shared validation:
- minimum password length:
8 - maximum password length:
128 - confirm password must match
After a successful registration:
- the user is redirected to
/auth/confirm?mode=verify-email&email=... - a verification email is sent
- the user is not treated as fully signed in for protected app access until verification completes
On /login, a verified credential user signs in with email and password.
If the account is unverified, the template does not silently fail. It redirects the user to:
/auth/confirm?mode=verify-email&email=...That behavior is tested in the template’s E2E suite and is part of the intended UX.
Protected Route Behavior
Section titled “Protected Route Behavior”NuxtBase protects these route families:
/dashboard/admin/ai
The route middleware does this:
- no session -> redirect to
/login - session exists but email not verified -> redirect to the verify-email confirmation page
- verified admin on auth pages -> redirect to
/admin - verified non-admin on auth pages -> redirect to
/dashboard
This means auth status is checked at navigation time, not only inside page components.
Password Reset Flow
Section titled “Password Reset Flow”The shipped reset flow is:
- user opens
/forgot-password - user submits email
- app redirects to
/auth/confirm?mode=reset-password&email=... - reset email contains a Better Auth password-reset link
- user opens
/reset-password - user sets a new password
- app redirects back to
/login
The reset page also has explicit states for:
- missing token
- invalid token
- ready
That makes the flow easier to debug than a generic broken form.
Magic Links
Section titled “Magic Links”Although this page is called “Email & Password”, the default login screen also supports magic links.
The flow is simple:
- user enters email on
/login - user clicks
Send Magic Link - app emails a sign-in link
- opening that link signs the user in and returns them to the app
The E2E suite covers this behavior as a first-class auth path.
Redirect Query Parameters
Section titled “Redirect Query Parameters”The login page supports a safe redirect query parameter, for example:
/login?redirect=/dashboard/projectsAfter successful login, the user is sent to the requested internal path.
The implementation only accepts safe app-relative paths, which protects against open redirect issues.
What To Test Before Customizing
Section titled “What To Test Before Customizing”- register a new account
- verify the email arrives
- confirm unverified login redirects to
/auth/confirm - verify the email and reach the dashboard
- request a password reset and complete it
- test a magic-link sign-in