Alternate approach

If you prefer, you can upgrade your existing login policy to v2 directly instead of creating a new v2 login policy as described in the previous steps.

Warning! Once you update your existing login policy, all clients using that login policy are immediately upgraded to Hosted Login v2.

To upgrade your existing login policy directly, follow the adjusted steps below.

Step 1: Get an access token

Complete the Get configuration token page.

If you’ve already done this and it was less than an hour ago, your token may still be valid and we’ve populated it for you below.

Step 2: GET OIDC client configuration

Call the /config/clients/<janrainOidcClientId> endpoint with GET method to obtain your existing Login Policy identifier.

curl -X GET \
https://v1.api.REGION.janrain.com/CUSTOMER_ID/config/clients/OIDC_CLIENT_ID \
	-H 'Authorization: Bearer ACCESS_TOKEN'

Enter the loginPolicy value from your call’s response below.

See example of a loginPolicy identifier

Step 3: GET login policy

Call the /config/loginPolicies/<loginPolicy> endpoint with GET method to get your existing Login Policy configuration. This configuration includes your loginURL.

curl -X GET \
https://v1.api.REGION.janrain.com/CUSTOMER_ID/config/loginPolicies/LOGIN_POLICY \
	-H 'Authorization: Bearer ACCESS_TOKEN'

In the response to this call, does your loginURL already include the v2 indicator? Like this:

"loginURL": "https://v1.api.us.janrain.com/e0a70b4f-1eef-4856-bcdb-f050fee66aae/auth-ui/v2/login",

If so, STOP HERE! You’re already using Hosted Login v2 for this login policy and all clients associated with it. You may want to:

  • Check a different login policy - To do this, you can start over.
  • Move forward with next steps related to the v2 upgrade - Skip to Add SMS Attributes.
  • Learn more about Hosted Login v2 - See Learn More.

Step 4: Edit login policy

Copy the full JSON object from the response and paste it into the text box below.

Then make the following change:

  • Update the loginURL for Hosted Login v2: Change .../auth-ui/login to .../auth-ui/v2/login
See example of an updated login policy configuration for v2

Tip! The _links object is not configurable and can be safely removed from the JSON for simplicity, as in the example above.

Step 5: PUT login policy

To publish the updated login policy, call the same endpoint with the PUT method, passing the full, updated JSON object in the body of the call. This will upgrade your existing login policy to Hosted Login v2.

curl -X PUT \
https://v1.api.REGION.janrain.com/CUSTOMER_ID/config/loginPolicies/LOGIN_POLICY \
	-H 'Authorization: Bearer ACCESS_TOKEN' \
	-H 'Content-Type: application/json' \
	-d 'MY UPDATED LOGIN POLICY'
Troubleshooting Tips

Once you update your existing login policy, all clients using that login policy are automatically upgraded to Hosted Login v2.

NOTE: In order to use Hosted Login v2, you only need to update the loginPolicy. It is NOT necessary to update your Hosted Login calls (such as the /auth-ui/profile endpoint) to also refer to v2. When your loginPolicy is upgraded to v2, that becomes the default version for all Hosted Login calls you make with the associated OIDC client.