How to preview your site as a signed-in user
In TeleportHQ, you can see your web app the way a specific member sees it. In the editor, click the padlock button at the top left of the canvas, choose Act as User and pick a user from your database. The canvas then shows that user's name, details and signed-in content, and an Access Restricted label on pages they aren't allowed to open. Choose Act as Logged Out to go back to the guest view.
Before you start
- Authentication must be turned on. See How to add sign-up and login to your site.
- You need at least one user. If you have none, click Create New User at the bottom of the user list. See How to manage your site's users and roles.
Steps
In the TeleportHQ editor, click the padlock button at the top left of the canvas. It shows Logged Out.
The TeleportHQ padlock menu has:
- Act as User ("Preview as a logged-in user").
- Act as Logged Out ("Preview as a guest user"). The tick shows which one you're using.
- Manage Settings & Users, which opens the users list, with the sign-in settings on its second tab.
- Click Act as User. The Select User list opens beside the menu.
- Type in Search users... to find someone, for example
maria. - Click the user's name. The padlock button now shows their name, or the first part of their email.
The pencil next to a user opens Edit User, to change their name or role. See How to manage your site's users and roles.
To go back to the guest view:
- Click the padlock button again.
- Click Act as Logged Out. The button shows Logged Out.
Check that it worked
- The padlock button shows the user's name.
- Elements that depend on the signed-in user update on the canvas. For example, an Account → Name element shows that user's name, and elements shown only to signed-in users appear.
- On a page the user isn't allowed to open, a red Access Restricted label shows at the top left of the canvas. Point at it to read why, for example "This page requires one of these roles: editor. Current user has role: user". An orange Partial Access Restriction label means the page holds a component this user can't see.
Troubleshooting
"No users found" There are no accounts yet, or none match your search. Click Create New User at the bottom of the list.
"Failed to fetch users: …" TeleportHQ couldn't read your users from the database. Check that the data source still works in the Data Sources panel, then try again.
The padlock button is greyed out The editor is offline. Wait for the connection to come back.
Someone is missing from the list The list loads the first 100 accounts in alphabetical order. Type part of their name or email in Search users....
Good to know
- Act as User only changes the preview in your editor. It doesn't sign you in on the published site, and your visitors aren't affected.
- The editor never hides or redirects a protected page. It shows the Access Restricted label instead. To test the real redirects, publish your site, open the page in a private browser window and sign in there. See How to make a page visible only to signed-in users.
- Guest shoppers aren't in the list. In an online store, the guest rows that keep a visitor's cart don't appear.
- Editing the user you're previewing as updates the canvas right away.