|Screens Files||.ZIP upload not supportedRequires upload of individual files or manual creation of folder and file copy procedure||New Format!Single .ZIP file to upload, supports multiple .ZIP files|
|Example||Example configuration installed without uninstall option||Example configuration is optional to install and enable|
|Data Mapping||Custom UI||Uses Drupal Rules|
|Information tab||None||Includes an Information tab on the Janrain Configuration Page that provides the site installer and builder access to Janrain configuration information to assist with troubleshooting|
|Janrain Social Share||version 2 (as of October 2014)||version 3|
|Upgrades||No v1 upgrade to v2 available||Upgrade from v2.13 to v3 requires:
For sites that have user profiles connected with comments and other user-generated content we recommend taking a few steps to make sure the data is all properly tied together upon upgrade from v2 to v3. To help you do this, we have provided a SQL script below that you can ask your DBA to run on your Drupal database.
If log-in is used purely as a gateway to additional content and is not tied to user-created posts, comments, pages, or other content, it is possible to simply uninstall v2 and install v3. All user data resides safely on Janrain’s servers and will update on the Drupal site as soon as the user logs in again.
Note: The connection between the user and the user’s content is stored in the Drupal database and not in Registration. Content can be anything in Drupal that may be associated with a user (depending on how the Drupal site is set up).
For sites that configure data mapping, the logic must be recreated using our new integration with Drupal Rules.
With version 3 of the Janrain module we combined the Social Login (Engage) and Registration (Capture) modules into a single, more efficient module (with submodules that can be enabled to add functionality as desired). The processes of upgrading from either v2 module are similar as a result of our continued use of the authmap table in the database to map the authentication.
To upgrade from v2 to v3:
1. Run the SQL migration script that matches your module (either Engage or Capture):
SQL script for upgrading from Janrain Registration (Capture):
SQL script for upgrading from Janrain Social Login (Engage):
2. Disable, uninstall, and delete the v2 module(s).
3. Download, enable, and configure the v3 module to use the same app.
The Janrain module is the main (core) module, and consists of a number of submodules. A module (including the main module) must be enabled to implement its functionality.
Each module you enable adds another layer of Janrain functionality (Social Login, Registration, and so on) to the Drupal site.
The following table describes all of the v3 modules and submodules:
|Name||Module or Submodule||Required or Optional||Description|
|Janrain||module||Required||The main (core) Janrain services module that must be enabled to implement the integration.
Enabling Janrain core makes certain hooks available to expert programmers who want to write their own implementation of Janrain services.
|Janrain Admin UI||submodule||Optional||Turns on the Janrain administrative UI tabs. This could be disabled in the case where a customer does not want Drupal administrators to change the configuration.
Enabling Admin UI creates a page where you can configure your Janrain Social Login and/or Registration implementations.
|Janrain Data||submodule||Optional||Enabling Janrain Data creates mapping between Janrain customer profile data and Drupal fields.|
|Janrain Example||submodule||Optional||Includes a reference implementation of Janrain services on a Drupal site (that is, it implements all the other modules on the Drupal site).
Janrain Example implements fully-functional versions of Janrain core, Janrain User Interface, and Janrain Data on a Drupal site. We encourage you to copy and customize this submodule to meet your needs.
The Example submodule activates Drupal users who are already linked to Registration accounts, so that a user logged in to a Registration account will also be logged in to Drupal. (Specifically, users logged in via Janrain are marked in Drupal as “active”.) The user’s status is permanently switched as soon as the blocked user logs in. This functionality is included to ensure a smoother demo and user experience.
When the Example submodule is disabled or not in use, Janrain honors Drupal bans (but does not record them in Registration).
|Janrain Social Sharing||submodule||Optional||Integrates Janrain Social Sharing on a Drupal site.
Enabling Janrain Social Sharing creates a field that can be placed anywhere that a Drupal field is allowed. The field displays the Janrain Social Sharing widget and allows users to share the page on which the field is located.
|Janrain User Interface||submodule||Optional||Enables the management of Janrain user interfaces (widgets) for placement on the Drupal site.
Enabling Janrain User Interface creates blocks that can be placed in Drupal structures that display the various components of Social Login and Registration.
For more information, see Installing modules (Drupal 7) in Drupal’s online help.
1. Install and enable the Janrain v3 module from https://www.drupal.org/project/janrain. Answer yes to enable dependent modules.
2. Configuration > People > Account Settings. If this is a new site, configure the user registration parameters.
Janrain core doesn’t have configuration methods, so after enabling it, we recommend enabling Janrain Admin UI, which allows you to configure Janrain core.
To prevent users with more limited permissions from changing the configuration, disable the Janrain Admin UI. The configuration will remain but the forms to change the configuration will be removed until Janrain Admin UI is enabled again.
When the Janrain module is in Social Login-only mode, the module doesn’t change the Configuration > People > Account settings; it honors them (admins beware!). However, when the Janrain module is in Registration mode, it forces the Who can register accounts? setting to Administrators Only since Registration should own registrations.
The Drupal Require email verification when a visitor creates an account setting is just something we honor. Drupal accounts won’t be created if this setting is active, and we don’t have verified emails on Social Login or Registration profiles.
This is also why it is best practice to make emails required, unique, and verified. But you are allowed to operate in the completely unsecured mode of unverified emails.
If you set up an admin account that is not connected to a Janrain user account, you may not be able to log in through the account provided by Janrain. If there is a problem with your configuration that affects Janrain registration and/or sign-in, you can use this URL to gain access to Drupal:
If you are using localhost and you cannot log in to the admin account via this URL, make sure your base URL is set correctly in your
When switching between Social Login and Social Login + Registration modes, remember to flush the caches (in Configuration > Development > Performance, click Clear all caches).
1. Configuration > People > Janrain
2. Select Social Login as the product type.
3. Enter your API key from the Janrain Engage dashboard for the app you wish to use.
4. The settings information will appear on the Information tab after configuration has been saved:
Enable the Janrain Data submodule.
Engage paths take the form of
For Facebook IDs, use
Use the Provider Guide to determine which attributes are returned by which provider.
1. Configuration > People > Janrain
2. Select Social Login + Registration as the product type.
3. Enter your Registration app URL, Client ID, and Client secret.
4. Upload the .ZIP file.
After you upload the .ZIP file, the Manage section expands.
5. The settings information will appear on the Information tab after the configuration has been saved:
Capture paths take the form of
1. Enable the Janrain Data submodule.
2. In Modules, enable Rules UI Module.
3. Configuration > Workflow > Rules > Add new rule
4. Enter a Name for the Rule.
5. For React on event, select Janrain customer information updated.
5. Click Save.
6. Select Add Action.
7. Select Store Janrain customer information.
8. In the Value field, add a variable such as
9. Expand the Data selector and find a selector such as site:current-user:name.
10. Click Save.
1. Enable the Sharing submodule.
2. Structure > Content Types
3. Edit the Basic Page content type.
4. Click Manage Fields.
5. Add a new field and widget: Janrain Share.
6. Social sharing can only be added to pages. Add a new basic page to the site (Content > Add Content > Basic Page) and sharing will be displayed on that page.
1. Enable the Janrain Admin UI submodule.
2. Select Administration > Structure > Blocks.
3. Identify the location for the new block.
Adding the Social Login block to the Help section creates this layout:
1. Ensure Rules UI module is enabled.
2. Configuration > Workflow > Rules > Active Rules.
3. Select your Rule.
4. Select Add Action.
5. Select Add a variable and click Continue.
6. For Value, select Text.
7. Select Continue.
8. Modify the default variable name.
9. Select Save.
10. Select Add Action.
11. Select Show Message on Site.
12. Place the variable in the Message.
14. Configuration > Performance > Clear all caches.
Follow the Installation instructions to implement Janrain services on one site.
To implement Janrain services across multiple sites, you can create a Drupal submodule based on the Janrain Example submodule and install this customized module on all your Drupal sites.
The Example submodule:
The Example submodule contains the following files:
|Example Submodule File||Description|
|janrain_example.info||In addition to describing the submodule and setting dependencies, this file contains the initial field_base calls for the fields that the Rules will populate.
|janrain_example.install||Handles user/login issues using
|janrain_example.rules_defaults.inc||Creates some example Rules using Drupal and Janrain SDK tools.|
|janrain_example.features.field_base.incjanrain_example.features.field_instance.inc||Defines the fields that Rules map into.|
|login.php||Adds Social Login to sign-in/sign-up pages. Maps incoming pictures onto user data.|
|registration.php||Creates the tab for edit Janrain profile on user pages. Handles log-in. Places or hides blocks according to signed-in state. More password recovery and email verification node setup.|
Before creating your own submodule based on the Janrain Example, read through all the code as many tasks are accomplished through actions in multiple files.
To create your own submodule, copy the Example into a different folder of the Janrain module folder and give it a unique name. For example, instead of “Example” it could be “Bluesites” and the
.info file might have the name “Janrain Bluesites”.
This is a task best suited for someone who has written modules before. The commenting is clear and it should be possible to make a solid submodule based on the given examples. Adding Rules involving numbers may mean adding dependencies on Drupal modules that support certain number types.
Always work in a development environment first, and happy coding!
If you have Drupal programming expertise on your staff, you can use the Janrain core module in standalone mode (that is, use the core module itself, without enabling any of the submodules) with the Janrain-provided hooks and function calls.
To use the Janrain core module in standalone mode, you need to configure your Registration widget to have an event handler that posts the response code to the Drupal service endpoint and “primes” the log-in. When you’re ready to actually log in, submit a login form to the regular Drupal login endpoint and the module will take care of Drupal account creation, linking, or log-in.
If you want to hook into data events without the Rule module, your module should implement a
hook_janrain_profile_received() handler which will receive a reference to a
Janrain::Profile object. This object has some convenience methods for working with the Profile:
toString(), which returns the profile as a JSON blob
get($jsonPathQuery), which pulls values based on the given JsonPath string
getIdentifiers(), which grabs a Capture UUID and any social identifiers from IDPs