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 Value: 1

Datatype: integer

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

appId

Required

Datatype: string

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

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

backplane

Default Value: false

Datatype: boolean

Set to true to enable Backplane.

backplaneBlock

Default Value: 20

Datatype: 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

Datatype: 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 Value: https://ssl-cdn.janrainbackplane.com/

Datatype: string

Specifies the domain from which to load the Backplane source.

backplaneReplayOnPageLoad

Default Value: false

Datatype: boolean

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

backplaneServerBaseUrl

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

Datatype: string

Specifies the Backplane server base URL.

backplaneVersion

Default Value: 1.2

Datatype: string

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

beforeJanrainCaptureWidgetOnLoad

Default Value: []

Datatype: array

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

captureServer

Required

Datatype: 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 Value: https://ssl-cdn.janraincapture.com

Datatype: 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

Datatype: 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 Value: false

Datatype: boolean

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

cookieDomain

Datatype: 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 Value: false

Datatype: boolean

Set to true to enable Single Sign-on.

federateLogoutCallback

Datatype: function

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

federateLogoutUri

Datatype: 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 Value: 'false'

Datatype: 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

Datatype: string

Specifies which SSO segment the current property belongs in.

federateServer

Required

Datatype: string

The URL of the Single Sign-on server.

federateSupportedSegments

Default Value: []

Datatype: array

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

federateXdReceiver

Datatype: 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 Value: 'default'

Datatype: string

Specifies which flow should be used. See also mobileFlowName.

flowVersion

Default Value: 'HEAD'

Datatype: 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 Value: false

Datatype: 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

Datatype: 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 Value: false

Datatype: 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, and an example in Customizing Registrations.

language

Default Value: 'en-US'

Datatype: 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 for more information.

logoutLinksClass

Default Value: 'capture_end_session'

Datatype: 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

Datatype: string

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

mobileFlowName

Datatype: 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

Datatype: array

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

modalBorderColor

Default Value: '#000'

Datatype: 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 Value: 0.5

Datatype: 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 Value: 10

Datatype: 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 Value: 10

Datatype: 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 width of the Registration widget modals.

modalCloseHtml

Datatype: string

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

modalCloseImage

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

Datatype: 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 Value: 'capture_modal_class'

Datatype: string

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

noModalBorderInlineCss

Default Value: false

Datatype: 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 Value: false

Datatype: boolean

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

quiltUrl

Default Value: 'https://d3hmp0045zy3cs.cloudfront.net'

Datatype: 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 Value: '2.2.19'

Datatype: 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

Datatype: string

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

recaptchaVersion

Default Value: 1

Datatype: integer

Specifies which version of ReCAPTCHA to use.

redirectFlow

Default Value: false

Datatype: boolean

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

redirectOnLogin

Default Value: false

Datatype: boolean

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

redirectUri

Datatype: 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 Value: 'socialRegister'

Datatype: string

Specifies the screen to render for social registration.

responseType

Datatype: 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, read Managing Sessions with Registration.

returnExperienceUserData

Datatype: array

A list of schema attributes that will be saved to the local storage key janrainCaptureReturnExperienceData as a stringified JSON object. See an example in Customizing Registrations.

screenToRender

Datatype: string

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

setProfileCookie

Default Value: false

Datatype: boolean

If set to true, the user profile will be saved to the local storage key janrainCaptureProfileData as a stringified JSON object. See an example in Customizing Registrations.

socialRegistrationCompleteRedirect

Datatype: string

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

socialRegistrationRedirect

Datatype: string

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

socialRegistrationRedirectUrlCondition

Datatype: object

A set of key-value pairs that must match the Registraion 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 Value: 'https://ssl-cdn.janrainsso.com'

Datatype: 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

Datatype: array

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

thinRegistration

Default Value: false

Datatype: 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

Datatype: 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 event is fired.