If you’re using Hosted Login v2, you can enable 2FA by adding the authentication.second_factor
setting in the Identity Cloud Console.
In general, settings can be added to Global Settings or to a specific property. In this case, 2FA should not be enabled as a global setting unless all your clients are configured to use Hosted Login v2. If you still have v1 clients, 2FA should be enabled at the property level only.
The steps below enable 2FA for a specific property:
authentication.second_factor
true
If you ever want to disable 2FA, you can set this value to false
or delete this setting.
It may take a few minutes for your changes to be reflected in Hosted Login after you add or update a setting in Console.
The next time you perform a login or registration, you will be prompted to provide the code that was sent to your email address.
Note that if the user has a valid mobileNumber
value in their profile, this screen will look a bit different. We’ll get into this next.
NOTE! You can start using SMS immediately, however there will be transactional cost incurred when SMS messages are sent in Production. If you plan to use this service, please reach out to your Akamai Identity Cloud representative for details.
When 2FA is enabled, the default behavior is to send the second-factor authentication code to the user’s email address.
Alternatively, the code can be sent to the user’s mobile device via SMS message. This option is automatically enabled for any end user with the expected mobile number value in their profile (as defined below).
Specifically, the following is required in order for SMS 2FA to work:
The schema must contain these two top-level attributes:
mobileNumber
mobileNumberVerified
The value stored in the mobileNumber
attribute in the user record must be a valid phone number including country code, with no spaces, dashes, dots or parentheses.
Examples of acceptable and unacceptable US phone number format as stored in the user record:
When a user adds their mobile number to their profile, the Hosted Login screen handles validation to ensure the phone number will work properly with 2FA. The user-friendly input field provides a country code drop-down and auto-formatting, and writes the required format to the user record.
Hosted Login’s SMS for 2FA works internationally!
You can check your schema in the Identity Cloud Console to see if you have the root-level mobileNumber
and mobileNumberVerified
attributes, which are required for 2FA via SMS to be enabled.
See Add SMS Attributes in the Hosted Login v2 Upgrade Guide for steps to check for these attributes and add them if they are missing.