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>
o_options
in the example above) can contain the following configuration parameters:Property | Description |
---|---|
domain |
required The domain name of your Outseta site (e.g. |
id |
optional The JavaScript variable name where Outseta functionality can be accessed (e.g. |
autoInitialize |
optional Whether or not to start initializing modules on page load. If this is set to |
countries |
optional A comma-separated list of countries to limit the country dropdown in address fields to (e.g. |
load |
optional The Outseta modules that will be loaded:
To load all use |
monitorDom |
optional 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 |
srcBase |
optional 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 A list of values to display in the State/Provence field when a country is selected. An example would be as follows: states: { 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 Where to store the user's authentication token:
|
translationLang |
optional The language to display Outseta embeds in. A value of |
translationsUrlPattern |
optional The URL template to use to download custom translation files. The value must contain a |
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 The URL to redirect to after a user is authenticated. If not set, the Post-Login URL will be used. |
authenticationCallbackMethod |
optional The HTTP method to use to redirect after a user is authenticated. If set to |
billingRenewalTerm |
optional Preselects the billing term for the user when registering with a numeric value:
|
clientIdentifier |
optional We will log the user into the account with a matching Client Identifier value, skipping the account selection step. |
countries |
optional List of uppercase country codes with which users can register (e.g. |
mode |
optional How the auth embed should appear to the user:
|
planFamilyUid |
optional The plan family the user may choose a plan from when registering. |
planPaymentTerm |
optional Preselects the billing term for the user when registering with a string value:
|
planUid |
optional Preselects the plan for the user when registering. |
passwordResetUrl |
optional 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 The URL to redirect to after the user resets their password. If not set, the user is redirected to the |
postRegistrationUrl |
optional 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 Whether or not the login form defaults the email address to the last email address used to log in. |
registrationConfirmationUrl |
optional The URL to send users to when clicking the button in the confirm account email. If not set, |
registrationUrl |
optional The URL to send users to when they click "Don't have an account? Create one now" link. |
selector |
optional The CSS selector indicates the elements that should trigger a popup embed to display (if |
state |
optional
|
skipPlanOptions |
optional Whether or not the user should skip the last step in the registration process. |
taxIdTypes |
optional 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 The functionality the auth embed should expose:
|
nocode
Property | Description |
---|---|
authMode |
optional How users should be authenticated:
|
clearQuerystring |
optional Whether or not to remove the access token after logging in from the querystring. |
hideBody |
optional Whether or not to hide the body on load. This should be set to |
hideProtectedLinks |
optional 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 |
loadMagicLink |
optional 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 |
|
optional 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 |
profile
Property | Description |
---|---|
countries |
optional List of uppercase country codes to allow users to set (e.g. |
mode |
optional How the auth embed should appear to the user. Can be set to one of the following values:
|
selector |
optional 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 Which tab the embed should open to. Can be set to one of the following values:
|
tabs |
optional 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. |