Registration JavaScript API settings

All of the settings below are located within the janrain.settings.capture namespace. For example:

janrain.settings.capture.modalBorderWidth = 4;

Settings must be defined before the janrainCaptureWidgetOnLoad function is called to load the Registration UI.


accessTokenLifeHours

Default:
integer

The amount of time that Registration and Single Sign-on sessions should last, in hours.


appId

Required 
string

The Capture application ID that represents a specific capture app. Example:

janrain.settings.capture.appId = 'x8n7eat5sd984y5nhxbv9ma98e';

backplane

Default: false 
boolean

Set to true to enable Backplane.


backplaneBlock

Default: 20 
integer

The amount of time to wait for a Backplane response, in seconds. This setting only applies to Backplane 2.


backplaneBusName

string

The name of the Backplane bus that the Registration widget should listen to. This setting is required when using Backplane.


backplaneChannelExpires

string

Controls when the Backplane channel cookie expires. Uses same syntax as cookies. Example:

janrain.settings.capture.backplaneChannelExpires = 'Fri, 3 Aug 2001 20:47:11 UTC';

backplaneLibrary

Default: https://ssl-cdn.janrainbackplane.com/ 
string

Specifies the domain from which to load the Backplane source.


backplaneReplayOnPageLoad

Default: false 
boolean

Replays all messages from the long-term Backplane cache on each page load.


backplaneServerBaseUrl

Default: https://backplane1.janrainbackplane.com/v1.2

string

Specifies the Backplane server base URL.


backplaneVersion

Default: 1.2 
string

Which version of Backplane to use. Can be ‘1.2’ or ‘2’.


beforeJanrainCaptureWidgetOnLoad

Default: []
array

Any functions added to this array will be executed immediately before the Registration widget loads.


captureServer

Required 
string

Specifies the URL used to communicate with the Registration service. This is automatically set by Akamai, but needs to be updated if you wish to use a custom CNAME for your registration service. Example:

janrain.settings.capture.captureServer = "https://login.mycooldomain.com";

cdnUrl

Default: https://ssl-cdn.janraincapture.com
string

Allows you to override the CDN domain that the Akamai assets are loaded from. Note: This is for specialized configurations only (you probably don’t want to change this).


clientId

Required 
string

A client ID from your Registration application. You should create a new client ID for each property that you deploy Registration on. Example:

janrain.settings.capture.clientId = "k8n534hdguau36be6bgrnx5vhn";

confirmModalClose

Default: false 
boolean

If set to true, prompts the user before closing any modal dialog.


cookieDomain

string

Changes the domain that cookies are created with. If not set, a domain is not specified for cookies upon creation and most browsers default to the current domain.


federate

Default: false
boolean

Set to true to enable Single Sign-on.


federateLogoutCallback

function

An optional function that is called after a user logs out of a Single Sign-on session.


federateLogoutUri

string

This setting is required if you are using Single Sign-on, and each site in your SSO segment must have its own federateLogoutUri page. You can make this a blank page or something more elaborate. It is called in a hidden iFrame from whichever site the user logs out on. It is commonly used to host custom behavior implemented once a user signs out, such as ending a server session on all other sites the user has visited, or clearing cookies. This value must be an absolute URL. For example:

janrain.settings.capture.federateLogoutUri = 'https://mycooldomain.com/logout'

federateNoRefresh

Default: false'
string

If set to 'true' (Note: this is the string “true”, not boolean true), SSO will not attempt to refresh the Registration session upon expiration.


federateSegment

string

Specifies which SSO segment the current property belongs in.


federateServer

Required
string

The URL of the Single Sign-on server.


federateSupportedSegments

Default: []
array

Segments that the current site is allowed to federate with using Single Sign-on.


federateXdReceiver

string

Each site that uses Single Sign-on must host a Cross Domain (XD) Receiver page that the SSO communication script can be loaded on. For example, the following HTML might be hosted at https://mycooldomain.com/xdcomm.html:

<!DOCTYPE html>
<meta charset=utf-8>
<title>Single Sign On Receiver</title>
<script src="https://d1lqe9temigv1p.cloudfront.net/js/lib/xdcomm.js">
</script>

flowName

Default: 'default'
string

Specifies which flow should be used. See also mobileFlowName.


flowVersion

Default: HEAD
string

Specifies which version of the flow to load. Typically we recommend using a fixed version in production, and using 'HEAD' (always points to the latest version) during development.


hasSettings

Default: false 
boolean

If set to true, the Registration widget will load additional settings defined by Akamai for this site. Note: This is for specialized configurations only (you probably don’t want to change this).


hideSavedProfileMessageDelay

integer

The amount of time before the “Your profile has been saved.” message disappears, in milliseconds. If this is not set, the message will persist.


keepProfileCookieAfterLogout

Default: false
boolean

If set to true, the janrainCaptureProfileData local storage key will not be deleted when a user logs out. The value will be cleared once the user closes their browser. See also setProfileCookie.


language

Default: en-US
string

Specifies the language to use. The janrain.settings.capture.language setting corresponds to the languages defined in the flow.

Note that this is a different setting from janrain.settings.language, which is associated with the Social Login Registration UI and only supports a limited set of languages; see the Social login JavaScript API settings for more information.


logoutLinksClass

Default: capture_end_session
string

Specifies the class that will be targeted to attach the Registration sign-out handler function. The class must be on an anchor or button tag to work. For example, either of the following would work:

<a href="#"class="capture\_end\_session">Log Out</a>
<button class="capture\_end\_session">Log Out</button>

mergeFlow

string

Specifies the screen to render for account merge. If not set, it falls back to janrain.settings.capture.registerFlow, and finally 'socialRegister'.


mobileFlowName

string

Specifies the flow to use if the Registration widget detects it is running in a mobile browser. If not set, it falls back to janrain.settings.capture.flowName.


mobileStylesheets

array

Stylesheet URLs that are loaded if the Registration widget detects it is running in a mobile browser.


modalBorderColor

Default: #000
string

We recommend that you not use this setting, and instead use janrain.settings.capture.noModalBorderInlineCss and custom CSS to style the Registration widget modals.

Specifies the border color of the Registration widget modals.


modalBorderOpacity

Default: 0.5
float

We recommend that you not use this setting, and instead use janrain.settings.capture.noModalBorderInlineCss and custom CSS to style the Registration widget modals.

Specifies the border opacity of the Registration widget modals.


modalBorderRadius

Default: 10
integer

We recommend that you not use this setting, and instead use janrain.settings.capture.noModalBorderInlineCss and custom CSS to style the Registration widget modals.

Specifies the border radius of the Registration widget modals.


modalBorderWidth

Default: 10
integer

We recommend that you not use this setting, and instead use janrain.settings.capture.noModalBorderInlineCss and custom CSS to style the JavaScript SDK modals.

Specifies the border width of the Registration widget modals.


modalCloseHtml

string

HTML that will be used for the modal close button. If not set, the Registration widget will use its default button.


modalCloseImage

Default: https://cdn.rpxnow.com/rel/img/17c96fc4b9c8464d1c95cd785dd3120b.png
string

The URL of an image to use as the modal close button. Note that this setting will be ignored if you have also set janrain.settings.capture.modalCloseHtml.


modalOpenClass

Default: capture_modal_class
string

Specifies the class that will be targeted to attach the Registration sign-in modal opener handler function.


noModalBorderInlineCss

Default: false
boolean

If set to true, the Registration widget will not add any inline styles for modal borders. Use this if you plan on overwriting the modal styles using CSS. This effectively disables the following settings:

  • modalBorderColor
  • modalBorderOpacity
  • modalBorderRadius
  • modalBorderWidth

noStyling

Default: false 
boolean

If set to true, the default CSS will not be loaded.


quiltUrl

Default: https://d3hmp0045zy3cs.cloudfront.net
string

Allows you to override the CDN domain from which the Identity Cloud UI assets are loaded. Note that this is for specialized configurations only: you probably don’t want to change this value.


quiltVersion

Default: 2.2.19
string

Allows you to override the version of the UI assets. This is for specialized configurations only: you probably don’t want to change this value.


recaptchaUrl

string

Specifies the URL from which to load the Google ReCAPTCHA script. Defaults to https://www.google.com/recaptcha/api.js for version 2. Version is specified by janrain.settings.capture.recaptchaVersion.


recaptchaVersion

Default:
integer

Specifies which version of ReCAPTCHA to use.


redirectFlow

Default: false
boolean

If set to true, the Registration widget will use the redirect flow as defined in Social Login Redirect Flow.


redirectOnLogin

Default: false
boolean

If set to true, the Registration widget will redirect the user to the value set in janrain.settings.capture.redirectUri.


redirectUri

string

This is required if using Single Sign-on with Registration. This value is used to identify the site within a segment.

Additionally, this setting can be used in conjunction with janrain.settings.capture.redirectOnLogin to redirect a user to another location after a successful traditional sign-in.


registerFlow

Default: socialRegister
string

Specifies the screen to render for social registration.


responseType

string

Accepts either 'token' or 'code'. Determines whether or not a Registration access token or an authorization code is returned after a successful sign-in. Typically, you want this set to 'token'. For more information, see Manage registration sessions.


returnExperienceUserData

array

A list of schema attributes that will be saved to the local storage key janrainCaptureReturnExperienceData as a stringified JSON object.


screenToRender

string

Specifies which screen to display. This can be used to override the default flow screen in certain scenarios.


setProfileCookie

Default: false
boolean

If set to true, the user profile will be saved to the local storage key janrainCaptureProfileData as a stringified JSON object.


socialRegistrationCompleteRedirect

string

Specifies a URL that the user will be redirected to upon a successful social registration.


socialRegistrationRedirect

string

Specifies a URL that the user will be redirected to upon initiating social registration.


socialRegistrationRedirectUrlCondition

object

A set of key-value pairs that must match the Registration server response or user data returned. If any of the values do not match the server response, no redirect will occur. In the example below, the redirect would only occur for users with the first name “Alex”:

janrian.settings.capture.socialRegistrationRedirectUrlCondition = {
  'firstName':'Alex'
}

ssoFileUrl

Default: https://ssl-cdn.janrainsso.com 
string

Allows you to override the URL Single Sign-on assets are loaded from. Note that this is for specialized configurations only: you probably don’t want to change this value.


stylesheets

array

A list of stylesheet URLs that the Registration widget will load.


thinRegistration

Default: false 
boolean

If set to true, the Registration widget does not display the socialRegistration screen after a user logs in for the first time using a social provider. To enable thin registration, use the Boolean value true:

janrian.settings.capture.thinRegistration = true;

Using a string value of any kind (such as "true") sets thinRegistration to false. Always use Boolean values when configuring thinRegistration.


transactionTimeout

integer

If set, will impose a timeout on all interactions with the Registration service (in milliseconds). If a transaction takes longer than the time specified, the [onCaptureTransactionTimeout]](doc:registration-javascript-api-events)