Remove v1 email

If you’re upgrading from Hosted Login v1 to v2, it is possible your flow is configured to send the v1 verification email to the end user upon registration. The v1 verification email contains a link the user must click in order to verify their email address.

When you upgrade to v2 and require email verification or enable 2FA, Hosted Login will start sending a new verification email which contains a code the end user must provide back in order to verify their email address.

Compare v1 and v2 emails

Updating your loginURL for v2 does not remove the v1 email - which means the user may receive both emails upon registration after you’ve upgraded to v2. If this is the case, you will need to remove the v1 email.

If you completed the previous step Add new strings, then you’ve already removed the v1 email from the standard registration forms. Below, we cover an alternate method for checking your forms for the v1 verification email and removing it if necessary.

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.

New to making API calls?

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.

Find my application owner Client Id and Secret
How to create the authorization code in Postman

Step 1: GET registration form

Call the /forms/<formName> endpoint with GET method, and in this case we’ll target the traditionalRegistrationForm.

EXAMPLE:

curl -X GET \
https://v1.api.REGION.janrain.com/config/APPLICATION_ID/flows/standard/forms/traditionalRegistrationForm \
	-H 'Authorization: Basic AUTHORIZATION CODE'

Step 2: Check the "next" object

In the response, check the "next" object. If it contains logic to send a verification mail, this means you have the v1 verification email enabled.

EXAMPLE:

{
	"action": "traditionalRegistration",
	"fields": [
		{
			"_self": "/config/a1bcde2fg3h456ijk7l8mnop9q/flows/standard/fields/emailAddress",
			"name": "emailAddress",
			"required": true
		},
		{
			"_self": "/config/a1bcde2fg3h456ijk7l8mnop9q/flows/standard/fields/newPassword",
			"name": "newPassword",
			"required": true
		},
		{
			"_self": "/config/a1bcde2fg3h456ijk7l8mnop9q/flows/standard/fields/newPasswordConfirm",
			"name": "newPasswordConfirm",
			"required": false
		}
	],
	"next": {
		"if": {
			"compare": "emailVerified",
			"to": null,
			"withOperator": "=="
		},
		"then": {
			"sendMail": {
				"mail": "registrationVerification"
			}
		},
		"type": "server"
	},
	"_self": "/config/a1bcde2fg3h456ijk7l8mnop9q/flows/standard/forms/traditionalRegistrationForm"
}

If the "next" object is null or does not contain logic to send a verification email, then the v1 email is already removed from this form. Skip to step 5.

Step 3: Edit registration form

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

Then make the following change:

  • Remove the v1 verification email by removing the "next" object from the form configuration

NOTE! If the current "next" object sends the verification mail and does other things too, you may want to revise the logic to remove just the verification email part, instead of removing the entire object. This depends on what you want the user experience to be. If you need assistance working with the "next" logic, please reach out to your Akamai Identity Cloud representative and we’ll be happy to help.

See example of a form with v1 email removed

Tip! The _self and required properties are not configurable here and can be safely removed from the JSON for simplicity, as in the example above.

Step 4: PUT registration form

Remove the v1 verification email by removing the "next" logic from the form. You can do this by calling the same endpoint with the PUT method. The body of your call should contain the full form definition, with the "next" object removed.

EXAMPLE:

curl -X PUT \
https://v1.api.REGION.janrain.com/config/APPLICATION_ID/flows/standard/forms/traditionalRegistrationForm \
	-H 'Authorization: Basic AUTHORIZATION CODE' \
	-H 'Content-Type: application/json' \
	-d 'MY EDITED FORM CONFIGURATION'

Step 5: Social registration

If you allow users to register with a social account (like Facebook or Google), repeat the above steps for the socialRegistrationForm.

EXAMPLE ENDPOINT:

https://v1.api.eu.janrain.com/config/a1bcde2fg3h456ijk7l8mnop9q/flows/standard/forms/socialRegistrationForm

Test!

Once you’ve removed the v1 verification email from your form(s), be sure to test registration as if you are an end user to see that you’re no longer receiving it.

If you require email verification or have 2FA enabled, you should now be getting the v2 verification email only.