Test mode

#Live and test mode

By default, your Userfront workspace is in test mode.

Test mode allows you to experiment and develop locally without affecting your live data.

You can enable live mode by adding a live domain.

  1. Add your domain as a live domain
  2. Ensure your page is using https://

#Why is my form in test mode?

If your page is not secured with https, or if the domain you are using is not on your list of live domains, your forms will be in test mode.

Example test domains include:

  • http:// example.com
  • localhost:3000
  • 192.168.1.10
ReasonExplanation
Test mode: httpYour page is served over http, which is insecure. This is OK for local development but not for production.
Test mode: domainThe domain or subdomain has not been added to your workspace's live domains. Add your domain in order to activate live mode.

To work with live data, see Domains › Live domains.

#Working in test mode

Your workspace is first created with 4 test users, each with an initial password set to testmodepassword.

You can log in with these users to test your application or you can sign up new users. Your initial users behave the same as any other user who signs up.

When in test mode, Userfront does not send welcome or confirmation emails. Anywhere an email would have been sent to a user, that information is displayed directly in the browser instead.

Userfront does not send emails in test mode; a link will be provided in the browser for your use.

For more information, see Client API reference › Test mode (reset links).

UsernameEmailPassword
adminadmin@example.comtestmodepassword
membermember@example.comtestmodepassword
viewerviewer@example.comtestmodepassword
unconfirmedunconfirmed@example.comtestmodepassword

#Allowed test mode passwords

These basic passwords are allowed in test mode to make testing easier:

  • test
  • dev
  • password

These passwords will not work in live mode.

#Working in live mode

Once you have added your live domain, all requests from your live domain will be in live mode.

Userfront uses the origin header to determine live mode.

This header is automatically set by the browser with each request and cannot be overridden.

#Include subdomains

If the "Include subdomains" toggle is selected for a live domain, Userfront treats all subdomains as live mode too.

This table gives example scenarios for various subdomain settings.

Live domainInclude subdomainsLive modeTest mode
example.comtruesub.example.com, sub.sub.example.com
example.comfalseOnly example.comsub.example.com, sub.sub.example.com
sub.example.comtruesub1.sub.example.com, sub2.sub.example.comexample.com, another.example.com
sub.example.comfalseOnly sub.example.comexample.com, another.example.com, sub.sub.example.com

#API requests in live mode

To make non-browser client-to-server API requests in live mode, include your live domain as the origin of the request.

For server-to-server API requests made with an API key, you do not need to include the origin header.