User accounts & login

How to add sign-up and login to your site

How to add sign-up and login to your site

In TeleportHQ, you add sign-up and login with Authentication. In the editor, click the padlock button Authentication at the top left of the canvas, then follow the Activate Authentication steps. TeleportHQ creates the sign-in, sign-up, forgot password, reset password and profile pages, keeps the accounts in a database, and adds the welcome and password reset emails. After you publish, visitors can create accounts on your site.

Before you start

  • Authentication makes your project a web app. On a website, TeleportHQ first opens a window titled Enable Web App features?. Nothing changes until you click Enable Web App features; Keep as a Presentation Website cancels. A web app's code can't be downloaded, and it needs a Web App slot to keep publishing after 7 days. TeleportHQ saves a backup named Before Web App features Enabled first, so you can go back. A project that is still blank (an empty home page and no components) gets no backup, because there is nothing in it to restore. See What is a web app in TeleportHQ? and Why does my web app need a slot, and what is the 7-day window?.
  • A database. User accounts are stored in a database. You can use the built-in TeleportHQ database or one of your own.
  • Be online. The Authentication button is greyed out while the editor is offline.

Steps

1. Start the activation

  1. Open your project in the TeleportHQ editor.
  2. At the top left of the canvas, click the padlock button Authentication (tooltip "Enable authentication").

    The padlock Authentication button at the top left of the TeleportHQ canvas, on a website without sign-in
  3. If your project is a website, the Enable Web App features? window opens. Click Enable Web App features.
  4. The Activate Authentication window lists What will happen:. Click Continue.

You can also start from the left sidebar:

  1. Click Plugins (the four-squares icon above Growth), then the Authentication row. It shows Off. Its settings open in a drawer beside the list.
  2. Under Feature, turn on the Authentication enabled switch. On a website the Enable Web App features? window opens first, then the Activate Authentication window, as in steps 3 and 4 above.
The TeleportHQ Plugins panel with the Authentication row, and its settings drawer with the Authentication enabled switch still off

2. Choose the database

  1. Under Select Database Type, the TeleportHQ database card ("Managed by TeleportHQ") is selected. Keep it, or click one of your own data sources. To connect a new one, click Create New Data Source.
  2. Click Continue.

If your project already has a database for another feature (for example, a store), TeleportHQ uses it and skips this step.

3. Create your first admin account (optional)

  1. Admin Email starts with admin@example.com. Replace it with your own address, for example owner@mybakery.com.
  2. In Admin Password and Confirm Password, type a password of at least 8 characters.
  3. If your site has a navigation bar or a footer, you also see Detect sign-in and account info in my Navigation and Footer, switched on. TeleportHQ then looks for existing "Log in" or "My account" buttons there and offers to connect them to the signed-in user with the AI Assistant. This uses AI tokens. Turn it off if you don't want it. See How to show the signed-in user's name, photo and details.
  4. Click Create Admin & Enable. To skip the admin account, click Skip & Enable.

The admin account can sign in to your site with full admin rights and open the admin panel, if you add one. You can add more accounts later. See How to manage your site's users and roles.

Check that it worked

  • A message says "Authentication enabled successfully. sign-in and sign-up pages created."
  • The padlock button now says Logged Out: you're previewing the site as a visitor who isn't signed in.
  • In the left sidebar, click Pages, Components & Tree View. The authentication folder holds the pages sign-in, sign-up, forgot-password, reset-password, profile and my-profile.

    The authentication folder in the TeleportHQ Pages list, with the sign-in, sign-up, forgot-password, reset-password, profile and my-profile pages
  • If your site has a navigation bar, TeleportHQ adds sign-in and sign-up links to it, unless it already has a sign-in or account link.
  • A window titled Authentication is Ready! offers a quick tour. Click Show Me, or Maybe Later. You can play the tour again from the left sidebar: Plugins → Authentication → Start tutorial.

After you publish, the sign-in page is at your site's address followed by /sign-in, for example https://sunny-bakery.teleporthq.app/sign-in, and the sign-up page at /sign-up. The activation window's list says /auth/signin and /auth/signup, but the pages are published under their page names. If you rename a page or give it another address, its address changes too. See How to publish a web app.

Troubleshooting

The Authentication button is greyed out The editor is offline. Wait until the connection is back.

"Failed to setup authentication tables: …" TeleportHQ couldn't prepare the database you picked. Authentication isn't turned on, and the window stays open. Check that the database connection works, then try again. See How to refresh, edit or remove a data source.

"Failed to create admin user: …" TeleportHQ couldn't create the admin account, so authentication isn't turned on yet. The window stays open. Try again, or click Skip & Enable and add the admin later with Create New User.

"This email already exists in the database. Please use a different email." An account with that email is already in the database. Type another address, or click Skip & Enable and use the existing account.

"Passwords do not match or are too short (minimum 8 characters)" Type the same password twice, with at least 8 characters. The message also shows when Admin Email isn't a valid email address.

"An account with … already exists, so it was kept with its password and role." This isn't an error. You turned authentication on again, and the admin account from last time is still in the database. Sign in with its old password.

The sign-in pages are gone If you deleted the whole authentication folder while authentication is on, rebuild it:

  1. Click the Project settings cog at the bottom of the left sidebar.
  2. Under Editor, click Preferences, then Editing.
  3. Turn on Show proposed plugins.
  4. In Pages, Components & Tree View, a dashed authentication folder appears with a Regenerate button. Click it.
  5. In the Regenerate Authentication Pages window, click Regenerate Pages.

See How to change editor preferences.

Good to know

Share

Related Articles

How to choose login methods (email and password, magic links)

In TeleportHQ, you choose how visitors sign in from the padlock button → Manage Settings & Users → Settings, or from Plugins → Authentication in the left sidebar, where you turn email and password sign-in on or off and enable providers like Google; magic links are marked Coming Soon, and the same places turn authentication off.

How to add "Sign in with Google" and other providers

In TeleportHQ, you add "Sign in with Google" (or GitHub, Apple, Facebook and about 60 other providers) by opening the provider in the authentication settings, copying its OAuth Callback URL into the provider's developer console, then pasting the Client ID and Client Secret back, clicking Enable and publishing.

How to manage your site's users and roles

In TeleportHQ, you manage the people who have accounts on your web app from the Users tab of the authentication window (padlock button → Manage Settings & Users → Users): a searchable list of every account where Create New User adds one, Edit opens the Edit User window to change a name or pick a role (such as admin or editor), and Remove deletes the account with everything the person added, keeping their orders, invoices and bookings.

How to make a page visible only to signed-in users

In TeleportHQ, you make a page members-only by opening its menu in the Pages list (or Page settings → Security) and turning on Require Authentication; visitors who aren't signed in are sent to the sign-in page, Role Protection limits the page to a role such as editor, and in an online store Subscriber Access limits it to customers with an active subscription.

How to customize welcome and password-reset emails

In TeleportHQ, the welcome, password reset and account deletion emails are the components welcome, password-reset and account-deletion in the Components list's email-templates → customer folder, which you design like any component; they're sent through your project's email provider (SendGrid, Mailgun, MailerSend, Postmark or Resend), set in Project settings → Credentials → Email Providers.

What is a web app in TeleportHQ?

In TeleportHQ, a web app is a project that uses server features (workflows, user sign-in, a store, bookings, a blog or help center, an admin panel, an AI chatbot); it publishes from TeleportHQ, can't be downloaded as code, and needs a Web App slot to keep running after 7 days, while show/hide, pop-ups and browser widgets work in websites too.