Settings

When the Social Login solution is initialized, it reads some or all of its settings from the settings object that you will include on each page upon which your Social Login UI will appear. These settings are included in the Janrain JavaScript that is generated when you design your UI in the Janrain Dashboard and save your configuration settings. See Implementing Social Login for more information.

If you published your configurations to the Janrain servers, your settings object will include only the tokenUrl. If you saved your configurations with embedded mode (Pro or Enterprise service levels only), all configuration settings will be included in the Janrain JavaScript code. You may modify these settings on a page-by-page basis in order to customize the solution where needed.

The following example sets essential values and overrides select formatting settings:

Supported Settings

The following fields in the janrain.settings object are supported for Pro and Enterprise customers unless otherwise noted.

Field Description
actionText Text that appears above provider buttons. To remove the action text completely, set:

janrain.settings.actionText = ' '

You must include the space between the quotes to remove the action text. Note that this is a different behavior than results from calling janrain.engage.signin.widget.setActionText(' '), which sets the action text to its default value.

WARNING: If you change the actionText setting, our Social Login UI will not make translations for you.

appID A string that identifies the application. Available from the Dashboard for this app (under Settings > App Info.)
appUrl The URL for the server for this application. Available from the Dashboard for this app (under Settings > App Info).

Note: If your Janrain representative has given you a new custom domain to use, change this setting immediately or else Social Login authentication will not work.

backgroundColor Background color. Must be a string containing a hexadecimal color code or RGB triplet.
borderColor The color of the border. Must be a string containing a hexadecimal color code or RGB triplet.
borderRadius Specifies the radius of the corners. Must be an integer.
bpChannel The channel ID for Backplane-enabled applications.
buttonBackgroundStyle Applies only to UIs with a format of two column or one column. Must be a string containing gradient, white, or gray.
buttonBorderColor Specifies the border color of the buttons. Applies only to UI with a format of two column or one column. Must be a string containing a hexadecimal color code or RGB triplet.
buttonBorderRadius Specifies the radius of the button corners. Applies only to UI with a format of two column or one column. Must be an integer.
custom Specifies customized presentation of the sign-in UI. If false or missing, the UI displays itself and handles user interactions. If true, the UI doesn’t display itself, and the sign-in page must initiate sign-in flow using setProviderFlow or triggerFlow. For more information, see Modify the Social Login UI.
customOpenid Value is true or false. Must be true to add custom Open ID providers.
customOpenidModalHeight Sets the height of the window for custom OpenID providers. Specify the number of pixels. The default value is 220. Not required.
customOpenidModalWidth Sets the width of the window for custom OpenID providers. Specify the number of pixels. The default value is 660. Not required.
customProviderInIFrame Value is true or false. If true, custom providers will not escape iframes when using redirect authentication.
extParams You can use this parameter to pass additional information to the providers on sign-in. In this release, only Disqus supports this, but other providers may use this feature in the future.
facebookAutoLogin true or false. When true, allows a user to automatically log in to the site when using Facebook. In order for this to work, the user must have previously logged in to the website using Facebook, and approved the app and current set of permissions being requested. Then the user will be automatically logged in when visiting a website that has the auto login configured.

This feature is currently available only to sites using a Janrain custom CNAME with their Social Login application. If your application URL uses rpxnow.com as part of its address, this will not work.

Only available to Enterprise customers.

facebookPermissions For Facebook only. This requests greater permissions than are originally granted during sign-in, which is also known as Progressive Permissioning. When a user signs in using Facebook and visits a specified area, the user will be prompted to share the additional information. Values requested must be valid Facebook permissions. A list of these may be found on the Facebook Developer site.

Note: you may need to be registered as a Facebook developer to access this link.

fontColor Color of text. Must be a string containing a hexadecimal color code or RGB triplet.
fontFamily Set action text font. Can be a comma-separated list of fonts families; we use the first available font in the list.
forceReauth If set to true, the identity provider is asked to re-authorize the user, even if the user has specified automatic authorization. Facebook, Twitter, Google+, and Sina Weibo support this feature. For Google+, it forces the user to reauthorize permissions. The default value is false.
format Specifies the arrangement of the provider buttons on an embedded UI: two column, one column, or a compact one row. Modal UIs ignore this setting because modal UIs always have two columns.
language Specifies a language for translating messages in the Social Login UI. Must be be one of the language codes listed in Localization.
linkClass Specifies the <a> element used to display a modal UI. The <a> element must have a class attribute that matches the linkClass specified in the JavaScript.
modalBorderColor Must be a string containing a hexadecimal color code or RGB triplet.
modalBorderOpacity Must be a number between 0 and 1.
modalBorderWidth Specifies the border width (in pixels) for modal UIs.
noProvidersCss When set to true and when used in conjunction with janrain.settings.custom = true, this setting prevents the providers.css file from loading if you don’t require that file. This is for cases where you want to load your own .css file.
noReturnExperience If you change this setting to true, end users will not be presented with a return experience. The default value is false.

Also available to Basic and Plus customers.

providers An array of Provider Specifier strings. All the strings are listed in the tables in Identity Providers.
providersPerPage Specifies the number of provider buttons to display at once.
rowHeight The row height (in pixels) in one row mode. The values are 40, 60, or 90.
scopes The Custom Scopes setting allows websites sharing the same Social Login solution to request different information from the user on a per-page basis. For more information on this feature, see Assign Scopes on a Per-page Basis. For each provider, specify a list of requested scopes in an array.

Only available to Enterprise customers.

showAttribution If true, a “Social Login by Janrain” message appears at the bottom of the UI.
storageType The value is either default or single cookie. If set to default, Janrain uses three cookies to store needed information (expected_tab, login_tab, welcome_info_name). If set as single cookie, Janrain uses a single cookie named janrain_engage_login_data that stores expected_tab, login_tab, and welcome_info_name data as JSON.

Also available to Basic and Plus customers.

tokenAction The one-time token can be issued to the application using different methods. The following values set the method used:

  • url or none—Sends the one-time token as a HTTP Post to the address specified by the tokenURL field. Use the url value when the JavaScript is set up for the server-side authentication method.
  • event—Janrain issues the one-time token within the object generated by the onProviderLoginToken event. Use this method when the JavaScript is set up for the client-side authentication model.
  • hybrid—Uses both methods depending on the browser context. Uses HTTP Post for desktop browser, and an onProviderLoginToken event for mobile browsers.

The method also affects the behavior of browsers on different platforms:

Platform: Desktop Browser

  • url—The UI authenticates in the currently-open window.
  • event—The UI opens a new window to authenticate.
  • hybrid—The UI opens a new window to authenticate.

Platform: Mobile Browser

  • url — The UI authenticates in the currently-open window.
  • event — The UI opens a new tab to authenticate.
  • hybrid — The UI authenticates in the currently-open window.

WARNING: Do not set tokenAction to event in a mobile application because this is incompatible with popup set to false. Set tokenAction to either url or hybrid and popup to false, and your application should work.

tokenUrl The URL that receives the one-time token.

Also available to Basic and Plus customers.

type String that specifies whether the UI is embedded in the web page or is modal (the UI pops up when the user clicks on a link).

The values are embed or modal.

width UI width (in pixels). Applies only to an embedded UI with a format of two column or one column.

Localization

The following languages are available for localizing your Social Login UI using janrain.settings.language. Note that if you are using Janrain’s Registration solution, the languages listed will only translate text inside of the Social Login UI; you must provide translations for the rest of the Registration UI. Contact Janrain for more information.

Available to: Pro, Enterprise

Code Language
ar Arabic
bg Bulgarian
cs Czech
da Danish
de German
el Greek (Modern)
en English
es Spanish
fi Finnish
fr French
he Hebrew
hr Croatian
hu Hungarian
id Indonesian
it Italian
ja Japanese
ko Korean
li Lithuanian
nb-NO Norwegian (Bokmål)
nl-BE Dutch (Belgium/Flemish)
nl-NL Dutch (Netherlands)
no Norwegian
po Polish
pt-BR Portuguese (Brazil)
pt-PT Portuguese (European/Continental/Portugal)
ro Romanian
ru Russian
sr Serbian
sk Slovak
sl Slovenian
sv Swedish
th Thai
uk Ukrainian
zh Chinese (Simplified)
zh-CHT Chinese (Traditional)