Outseta does not come with a testing/staging environment out of the box. However, you may emulate one by overriding settings with code and marking test accounts as demo accounts.

Almost all Outseta settings may be overridden with code, eliminating the need to change the settings in Outseta to work for your current dev environments.

Test accounts may be marked as demo accounts, this excludes them from all reports and therefore does not mess up your "production data." 

It's also possible to ask for a second account to use as a staging account after you've launched. Send an email to [email protected] titled "Request for Staging Account".

Configure Auth Options with Code

You'll most likely want to override Auth > Sign up and Login > Login settings > Post Login URL and Auth > Sign up and Login > Signup settings > Custom Registration URL.

  • Post Login URL (authenticationCallbackUrl) is where the user is sent after logging in.
  • Custom Registration URL (registrationConfirmationUrl) is where the user is sent to create a password after clicking the registration email button.

For authenticationCallbackUrl to take effect after signup the registrationConfirmationUrl has to be a page on your site that has the auth module enabled. If you're site uses an on page signup embed, use that page. If you use the popup embeds, use your home page for instance. 

To do so, add authenticationCallbackUrl and registrationConfirmationUrl to the auth module configuration in your Outseta Script Configuration.

<script>
<!-- Outseta Script Configuration -->
var o_options = {
domain: '[your-subdomain].outseta.com',
auth: {
// ... the current config ...
// Overrides the Post Login URL
authenticationCallbackUrl: '[custom url]'
// Overrides the Sign Up Confirmation URL
registrationConfirmationUrl: '[custom url]'
},
};
</script>

The JavaScript configuration guide lists all the possible settings you may override.

Use window.location.origin to build URLs

You may use window.location.origin to make the code work across staging and development environments.

In the code example below we first check to see if this is the main production website, and if not we configure the URLs using window.location.origin.

<script>
<!-- Outseta Script Configuration -->
// Check if the url is the main proudction url
var isProd = window.location.origin === "https://yourdomain.com";
var o_options = {
domain: 'your-subdomain.outseta.com',
auth: {
// ... the current config ...
// Overrides the Post Login URL
authenticationCallbackUrl: isProd ? null : window.location.origin + "/post-login"
// Overrides the Custom Registration URL
registrationConfirmationUrl: isProd ? null : window.location.origin + "/registration"
},
};
</script>

 

You may even configure the URLs in the production environment. However, team members might be confused when their configuration in Outseta does not work as expected, so make sure to communicate this with your team if you do!