The outseta.min.js script is the entry point to integrating our functionality into your website. It takes its configuration from a globally defined configuration object whose name is passed to the <script> embed as follows:
 
<script>
  var o_options = {
    domain: '[your-subdomain].outseta.com'
  };
</script>
<script src="https://cdn.outseta.com/outseta.min.js"
        data-options="o_options">
</script>
Outseta's sign up, login, and profile embeds each have default behaviors that dictate how they operate. Our javascript configuration guide allows you to further configure how the embeds operate. Want to keep a user logged in across tabs? Want to override the Post Login URL? You've come to the right place.
 
The configuration options object (o_options in the example above) can contain the following configuration parameters:
 
Property Description
domain

required  string

The domain name of your Outseta site (e.g. go.outseta.com)

id

optional  string:'Outseta'

The JavaScript variable name where Outseta functionality can be accessed (e.g. Outseta.getAccessToken())

autoInitialize

optional  boolean:true

Whether or not to start initializing modules on page load. If this is set to false, the page will be responsible for calling the initNocode(), initAuth(), and/or initProfile() methods.

countries

optional  string:''

A comma-separated list of countries to limit the country dropdown in address fields to (e.g. 'CA,US').

load

optional  string:'nocode,auth,profile'

The Outseta modules that will be loaded:

  • auth Sign-up and login functionality
  • chat Chat functionality
  • emailList Email list form functionality
  • leadCapture Lead capture form functionality
  • nocode Session management, token replacement, and protected content functionality
  • profile User profile, subscription, and billing management functionality
  • support Support ticket submission functionality

To load all use 'auth,chat,emailList,leadCapture,nocode,profile,support'

monitorDom

optional  boolean:false

Whether or not to monitor the web page for changes so we can attach event listeners or replace tokens on elements added after page load. This should be set to true if your website is a JavaScript single-page-application.

srcBase

optional  string:'https://cdn.outseta.com'

The base path from which to download Outseta JavaScript files from. This can be set to another URL if you are self-hosting the Outseta JavaScript files.

states

optional  object:null

A list of values to display in the State/Provence field when a country is selected. An example would be as follows:

states: {
'CA': 'BC,ON,QC',
'US': 'CA,HI,MA,TX'
}

This will turn the control into a dropdown list when the appropriate country is selected, and will ensure that entered values correctly match tax rate definitions.

tokenStorage

optional  string:'session'

Where to store the user's authentication token:

  • cookie The token will be stored in a cookie, which will recognize the user across multiple tabs and visits, and be available across all subdomains.
  • local The token will be stored in localStorage, which will recognize the user across multiple tabs and visits.
  • session The token will be stored in sessionStorage, which means that the user will only be recognized in the current browser tab and will be logged out when they close that tab.
translationLang

optional  string:'auto'

The language to display Outseta embeds in. A value of auto will attempt to honor the Accept-Language HTTP header. You can force the widgets to display only in a single language by setting this value to your language code (e.g. translationLang: 'en')

translationsUrlPattern

optional  string:null

The URL template to use to download custom translation files. The value must contain a {lang} parameter (e.g. https://domain.com/lang/Outseta.{lang}.json) that will be replaced at runtime with a two-character language code. See how to translate Outseta widgets for more information.

 

Module configuration

In addition to the global configuration parameters, each module can be configured by its own sub-object in the configuration object. They are each inserted under their own key:

<script>
  var o_options = {
    domain: '[your-subdomain].outseta.com',
auth: { ...authOptions },
nocode: { ...nocodeOptions },
profile: { ...profileOptions }
  };
</script>

auth

Property Description
authenticationCallbackUrl

optional  string:null

The URL to redirect to after a user is authenticated. If not set, the  Post-Login URL will be used.

authenticationCallbackMethod

optional  string:GET

The HTTP method to use to redirect after a user is authenticated. If set to POST, your application's callback URL will need to retrieve the access_token parameter from the form data.

billingRenewalTerm

optional  int:null

Preselects the billing term for the user when registering with a numeric value:

  • 1 => month
  • 2 => annual
  • 3 => quarterly
  • 4 =>one-time
clientIdentifier

optional string:null

We will log the user into the account with a matching Client Identifier value, skipping the account selection step.

countries

optional  string:null

List of uppercase country codes with which users can register (e.g. 'CA,US')

mode

optional  string:'popup'

How the auth embed should appear to the user:

  • popup
  • embed
planFamilyUid

optional  string:null

The plan family the user may choose a plan from when registering.

planPaymentTerm

optional  string:null

Preselects the billing term for the user when registering with a string value:

  • month
  • annual
  • quarter
  • oneTime
planUid

optional  string:null

Preselects the plan for the user when registering.

passwordResetUrl

optional  string:null

The URL to send users to when clicking the button in the reset password email.

If not set, the user is sent to the page they were on.

postPasswordResetUrl

optional  string:null

The URL to redirect to after the user resets their password.

If not set, the user is redirected to the authenticationCallbackUrl.

postRegistrationUrl

optional  string:null

The URL to send users to after completing the registration process.

If not set, the user will be shown a default message in the embed.

rememberLastEmail

optional  boolean:false

Whether or not the login form defaults the email address to the last email address used to log in.

registrationConfirmationUrl

optional  string:null

The URL to send users to when clicking the button in the confirm account email.

If not set, https://[domain].outseta.com/auth is used.

registrationUrl

optional string:null

The URL to send users to when they click "Don't have an account? Create one now" link.

selector

optional  string:'a[href*="outseta.com/widgets/auth"]'

The CSS selector indicates the elements that should trigger a popup embed to display (if mode is set to popup), or the element that an embed should be located within (if mode is set to embed).

state

optional  

  • login Same as setting widgetMode to login
  • forgotPassword Same as clicking "Forgot password?"
  • selectPlan Same as setting widgetMode to register
  • register Skips plan selection. planUid must be set.
  • checkout Skip to the last step of the registration process. registrationDefaults and planUid must be set.
skipPlanOptions

optional  boolean:false

Whether or not the user should skip the last step in the registration process.

taxIdTypes

optional  string[]:null

An array of tax id abbreviations to display in the Tax Id Type dropdown. A list of tax id abbreviations can be found at https://docs.stripe.com/billing/customer/tax-ids.

widgetMode

optional  string:'login|register'

The functionality the auth embed should expose:

  • login Only login functionality
  • register Only registration functionality
  • login|register Both login and registration functionality

 

nocode

Property Description
authMode

optional string:'embed'

How users should be authenticated:

  • embed use Outseta embeds
  • oidc use OpenID Connect (requires an OAuth Client entry for your website)
clearQuerystring

optional boolean:false

Whether or not to remove the access token after logging in from the querystring.

hideBody

optional  boolean:true

Whether or not to hide the body on load. This should be set to false if your website builder loads user JavaScript files after document.load to prevent a flash of content.

hideProtectedLinks

optional  boolean:true

Whether or not to hide navigation links to protected content. By default Outseta hides links that the user does not have access to. However, if you want to display the links and redirect the user to a page where they can subscribe or upgrade their plan, set this value to false.

loadMagicLink

optional  boolean:true

Whether or not to automatically load the Magic.link Javascript files if the integration is enabled. By default Outseta will load these files on all pages if the user is not authenticated. However, if you want to only load the files on certain pages, set this value to false.

removeProtectedElements

optional boolean:false

Whether or not to remove elements that the user does not have access to from the DOM so that they cannot be viewed in a browser inspector. By default protected elements will be hidden via CSS with display: none

 

profile

Property Description
countries

optional  string:null

List of uppercase country codes to allow users to set (e.g. 'CA,US')

mode

optional  string:'popup'

How the auth embed should appear to the user. Can be set to one of the following values:

  • popup
  • embed
selector

optional  string:'a[href*="outseta.com/widgets/profile"]'

A CSS selector used to indicate the elements that should trigger a popup embed to display, or the element that an embed should be located within.

tab

optional  string:'profile'

Which tab the embed should open to. Can be set to one of the following values:

  • account
  • billing
  • passwordChange
  • plan
  • planCancel
  • planChange
  • profile
  • team
  • teamMemberInvite
tabs

optional  string:'profile,account,team,plan,billing'

Which tabs should be enabled in the embed. The enabled tabs should be passed as a comma-separated string. By default, all tabs are enabled.