This quickstart will get you up and running with auth in about 10 minutes.
# 1. Add your signup form
- Paste the
<head>of your HTML
- Paste the
<body>of your HTML (or follow the React or Vue.js instructions)
View a working example:
# 2. Use your signup form
Give it a try: fill out your signup form and submit it.
Your form is in test mode, which means it goes through the signup flow without creating a new user each time.
Upon successful signup, the form does 2 things:
- Redirects you to
/dashboard. We'll edit this next.
- Adds a secure access token named to your browser's cookies. This token is a JWT with the user's information, which you can send to your own backend.
# 3. Set your redirect & domain
Settings section of the Userfront dashboard.
In the Auth redirects section, you can tell Userfront where to redirect the user after they log in, log out, sign up, or need to reset their password.
Try updating the "Signup path" to
/home, then re-submit your signup form. You should be redirected to
/home this time.
You can also activate your account and add your website to the list of Live domains. Whenever your signup form loads at this domain, it will automatically be in production mode.
# 4. Add login and others
Follow the same process for your other tools:
- Add a login form to your
- Add a password reset form to your
- Add a logout button anywhere you need it
Your tools will all work in test mode.
When you deploy your tools to any of your live domains, they will work in live mode automatically.
Congratulations, you've added auth to your site.
Learn more about the JWT access token: