Deploy React auth to Vercel in minutes
Email and password sign-up with a confirmation link, sign-in, and an account page with every active session, live on Vercel. Four console settings, one example app and one deploy.

On this page
This guide puts a React app with real authentication on Vercel. Nulvless handles the accounts, the confirmation email and the sessions. Vercel serves the app. You write no auth code: the app is the account center example, which you create with the Nulvless CLI.
By the end, anyone can open your vercel.app URL, sign up with email and
password, confirm the account from the link in the email, sign in, and see
every device they are signed in on.
Build this with your agent
A ready prompt for Claude Code, Cursor, ChatGPT or any coding agent. It points the agent at this guide and the docs, so it follows the real API instead of guessing.
What you need
The settings below belong to one environment. Pick the environment this
deployment will use, such as main for production, and make every change in
it.
1. Set up sign-up and sign-in in the console
Sign-up: email, confirmed by link
Open Authentication → Registration. Under Sign-ups:
- Allow new users to sign up is on.
- Required credentials: Email.
- Confirmation type: Link.
Save. Every new account now gets an email with a link, and the account only works after the link is opened.
Sign-in: email and password
Open Authentication → Authentications. Under Authentication methods, choose Email and password for Email, and save.
The Passwords section on the same page sets the minimum length and the characters a password needs.
Create a public API key
Open API Keys and choose Create public key. Give it a name, such as
vercel-web, and copy the key. It starts with pk-.
A public key is meant for the browser: it can only do what the signed-in user
could already do. The private key (sk-…) never goes into this app.
Copy the environment URL
On the project Overview, copy the URL of the environment. It looks like
https://<project>.nulvless.co.
2. Create the app
Install the CLI and create the app from the account center example:
npm install --global @nulvless/cli
nulvless create my-app --example account-center-react
cd my-app
npm installIt is a Vite app with React Router. The pages that matter here:
/sign-upand/sign-in. After sign-up, a confirmation link sends the user to/check-email./activateconfirms the account from the link in the email./accountlists the user's sessions and can end any of them.
The client reads two variables:
import { createClient, Storage } from '@nulvless/nulvless-js';
export const nulvless = createClient(import.meta.env.VITE_NULVLESS_URL, import.meta.env.VITE_NULVLESS_KEY, {
storage: Storage.Local,
trackUser: true,
});3. Let Vercel serve every route
The app routes in the browser. Opened directly, /activate?token=… from the
email would answer 404 on Vercel, because no file exists at that path. Add a
vercel.json at the root of the app that sends every path to index.html:
{
"rewrites": [{ "source": "/(.*)", "destination": "/index.html" }]
}4. Deploy
Install the Vercel CLI and link the folder to a new project. Vercel detects Vite, so accept the defaults:
npm install --global vercel
vercel linkVite writes the variables into the bundle at build time, so add them before the production build:
vercel env add VITE_NULVLESS_URL production
vercel env add VITE_NULVLESS_KEY productionPaste the environment URL and the pk- key when asked. Then deploy:
vercel --prodVercel prints the production URL, such as https://my-app.vercel.app.
Prefer Git? Push the folder to GitHub, import the repository in the Vercel dashboard, and add the same two variables under Environment Variables before the first deploy.
5. Point the console at your Vercel URL
Back in the console, open Redirect URLs in the project and use your Vercel URL:
- Site URL:
https://my-app.vercel.app - Confirmation URL:
https://my-app.vercel.app/activate. This is where the link in the sign-up email leads. - Redirect URIs: add
https://my-app.vercel.app. Redirects only go to the URLs listed here.
These are console settings, so they need no new deploy.
6. Try it
- Open
https://my-app.vercel.app/sign-upand create an account. - The app moves to
/check-email. Open the email and choose the link: it opens/activateon your Vercel URL and confirms the account. - Sign in. Then sign in again from another browser.
- Open Account: both sessions are listed, and the current one is marked This device. Choose Sign out on the other one, and that browser is signed out on its next request.
The new user also shows under Authentication → Users in the console.
Until you connect an email provider, emails go out from the Nulvless shared sender, which has a low hourly limit. Connect your own before real users sign up. The Communications guide shows how.
Where to go next
- Run the app locally with a
.env.localcopied from.env.example. Addhttp://localhost:5173to the redirect URIs, and point the confirmation URL athttp://localhost:5173/activatewhile you test. - Ask for a second factor at sign-in: turn on a method under Authentications and the example already shows the code step. React authentication with MFA explains how it works.
- Keep test users out of production with a separate environment for preview deploys: Why staging users can never reach production.

