Hosted Login v2 comes with some new screens and changes to existing screens. This means there are new text elements that can be customized and translated.
For example, some new text strings in the v2 Account Security screen are highlighted below:
The new screens and text will work immediately upon upgrade to v2, as there are default values Hosted Login will use. However, if you’d like to customize the new text or provide translations for other languages, the new text strings must be added to your flow.
You can add the new translatable strings to your flow(s) using the Identity Cloud Flow Configuration API, which we’ll step through next.
In this section, you’ll make RESTful API calls to the Identity Cloud using your platform or language of choice. We provide complete sample calls in cURL format.
NOTE: If your region and application ID are not populated in the API examples below, go back and complete the Gather Your Details section, then return to this page.
We recommend using a platform called Postman - a downloadable application for making API calls easily. You can download Postman here.
In this guide, we use your inputs to generate the calls for you in cURL format, which you can import into Postman:
These calls require Basic Authorization. To create the authorization code for these calls, your application owner Client Id
and Secret
must be combined with a colon in between (id:secret) and then base64 encoded.
You can find the application owner Client Id and Secret in the Identity Cloud Console:
Client Id
and Secret
in the Credentials section. Click the copy icon to left of each to quickly copy and paste them where needed.
Postman will create the authorization code for you. All you need to do is:
Client Id
as the Username and Secret
as the Password
When you Send the call, Postman will generate the Authorization header for you, and this will override the Authorization template from the imported call.
The new v2 text strings are customized via your flow configuration. Depending on when your flow was originally provisioned, it may not contain the v2 text strings or other v2 updates yet.
If the v2 text strings haven’t been added to your flow, Hosted Login will display the default v2 text in user-facing screens.
To check for which elements need to be added or deleted from your flow in order to make it compatible with Hosted Login v2, make an API call to the /upgrades/hosted_login_v2
endpoint using the GET method.
EXAMPLE:
curl -X GET \
https://v1.api.us.janrain.com/config/a1bcde2fg3h456ijk7l8mnop9q/flows/standard/upgrades/hosted_login_v2 \
-H 'Authorization: Basic AUTHORIZATION CODE'
Response Status | Response Body | Outcome |
---|---|---|
200 OK |
|
The listed items need to be added/removed to upgrade your flow for v2. Continue with the next call to make the listed flow changes, including adding all necessary text strings. |
200 OK |
|
Your flow has already been upgraded for v2, including all necessary text strings. You do not need to make the next call. |
Warning: If the previous GET call responded with anything in the "itemsToDelete"
array, that means there is logic (in the "next"
block of the listed form) that sends the v1 verification email. The following call will delete this logic so that only the v2 verification email will be sent.
If you have added any custom logic into the "next"
block of this form, make sure to copy and save it somewhere before you make the following call. This way you can add it back if needed.
To add the missing v2 text strings to your flow, make an API call to the same endpoint using the POST method.
EXAMPLE:
curl -X POST \
https://v1.api.us.janrain.com/config/a1bcde2fg3h456ijk7l8mnop9q/flows/standard/upgrades/hosted_login_v2 \
-H 'Authorization: Basic AUTHORIZATION CODE'
Response Status | Response Body | Outcome |
---|---|---|
204 No Content |
Empty | The call was successful and your flow has been upgraded for v2, including adding all necessary text strings. |
The new strings will work the same as existing translatable strings, which can be viewed and configured via the Identity Cloud Console or the Flow Configuration API.
For more information on the v2 text strings, see Hosted Login v2 screens text reference.