JavaScript SDK screens overview

๐Ÿ“˜

The content on this page deals with a legacy feature of the โ€‹Akamaiโ€‹Identity Cloud (in this case, the JavaScript SDK). If you are currently an โ€‹Akamaiโ€‹ customer and are using the JavaScript SDK, that SDK is still supported. However, if youโ€™re new to the โ€‹Akamaiโ€‹ the JavaScript SDK is no longer available. Instead, you should use Hosted Login for your login and registration needs.


Registration screens exist in two parts:

  1. Server-side configurations
  2. Client-side HTML

In order for a screen to render, both parts must be in place.

Server-side, the screenโ€™s relationships to other screens and how it is displayed by default are defined in a configuration file. This information can be viewed and configured remotely, as documented in theย Configuration API operations.

Client-side, screens are rendered via HTMLย 

ย tags that haveย idย attributes corresponding to the screenโ€™s name (as defined in the server-side configuration file). By default, all screens contain a CSS rule set toย "display: none", and the Akamai JavaScript modifies this rule to display and hide the appropriate screen based user interaction moving through he registration experience.

Optionally, there may also be JTL (Janrain Templating Language) markup within the screenโ€™sย div. The widget uses this markup to render form elements on the screen. An example screenย 

ย for theย forgotPassword screen and JTL tags for theย forgotPasswordFormย is shown below:

<div style="display:none;"id="forgotPassword">
 <div class="capture_header">
 <h1>Create New Password</h1>
 </div>
 <h2>We'll send you a link to create a new password.</h2>
 {* #forgotPasswordForm *}
 {* signInEmailAddress *}
 <div class="capture_footer">
 <div class="capture_left">
 {* backButton *}
 </div>
 <div class="capture_right">
 <input value="Send" type="submit" class="capture_btn capture_primary">
 </div>
 </div>
 {* /forgotPasswordForm *}
</div>

Screen modality

By default, screens render client-side as a modal (with the exception being theย editProfile screen). To change this configuration to all-embedded, you will need to make both client-side and server-side changes:

  • Server-side: Set all screens toย modal=falseย by using theย Configuration API.

  • Client-Side: Remove all anchor tags withย onclickย attributes that call theย janrain.capture.ui.modal.close()ย function, or replace them with your own functions (for example, redirecting a user from theย signIn screen to theย editProfile screen after successful login).


๐Ÿ“˜

If you want both a modal and an embedded version of your screens, you can do one of the following:

  • Embed all screens, then create your own modals client-side where desired.
  • Create two backend configuration files.

Talk to your โ€‹Akamaiโ€‹ representative for details.


Information on customizing the appearance/styling of screens can be found in the articleย Modify form styles and appearance.


Render screens programmatically

Unless noted otherwise (such as for theย verifyEmail screen), most screens can be rendered in the browser programmatically, either by calling a JavaScript function or placing aย data-capturescreenย HTML attribute on anย anchorย tag.

For example, theย forgotPassword screen can be rendered by either of the following methods, assuming the screen markup exists on the userโ€™s current page.

<a href="#"onclick="janrain.capture.ui.renderScreen('forgotPassword')">Forgot your password?</a>
<a href="#"data-capturescreen="forgotPassword">Forgot your password?</a>

Screen entry-points

The registration or login flow begins at one of these screens:

  • signIn
  • returnTraditional
  • returnSocial