Sign-In Widget i18n Property Overrides for Device Assurance Custom Remediation
Last Updated:
Overview
The Okta Sign-In Widget supports the customization of default text strings displayed across various views, but the Custom Remediation for Device Assurance feature lacks native text localization.
Administrators can resolve this by defining customizations for these strings in multiple locales using the custom code editor. Administrators author custom remediation messages in a single primary locale, and Okta displays them in that language for all end users, regardless of individual locale settings.
Applies To
- Okta Identity Engine (OIE)
- Sign-In Widget
- Customization
- Device Assurance Policies
- Custom Remediation for Device Assurance
Cause
The Custom Remediation for Device Assurance feature does not natively support text localization. Administrators author custom remediation messages in a single primary locale, and Okta displays them in that language for all end users, regardless of individual locale settings. This presents challenges for organizations with a multilingual user base requiring localized messaging across different regions.
Solution
How can custom remediation strings be configured for the Okta Sign-In Widget?
Organizations using a Sign-In Widget hosted on a custom domain can override default strings through the i18n configuration object in the custom code editor. This process is outlined in the Updates to widget i18n properties developer documentation and the How to Create Custom Labels in the Sign-in Widget article.
Access the custom code editor from the Admin Console to modify the brand configuration for a custom domain:
- Go to Customizations > Brand.
- Select the brand associated with a custom domain.
- Go to Pages > Configure (within the Sign-in page section).
- Select Edit in the Code editor.
In most cases, administrators specify text overrides for properties listed in the login.properties file, which includes Okta-defined keys (for example, primaryauth.title). However, strings used for Custom Remediation for Device Assurance do not appear in this file, as administrators dynamically define them. Despite not appearing in the login.properties file, custom remediation strings have unique i18n property keys.
How can a custom remediation message replace the default remediation message for a device assurance condition?
Construct the key for a device assurance condition with a default remediation message, such as a minimum Android version, by appending a specific string to the default key.
- Search the
login.propertiesfile for the key used by the default remediation message displayed for a failing device assurance condition. - Append
device.assurance.custom.remediationto the key.
For example, use device.assurance.custom.remediation.idx.error.code.access_denied.device_assurance.remediation.android.upgrade_os_version for the idx.error.code.access_denied.device_assurance.remediation.android.upgrade_os_version key.
How are keys constructed for device assurance conditions without a default remediation message?
Construct the key for a device assurance condition without a default remediation message, such as rooting or conditions created using the osquery Advanced Posture Checks feature, by appending a specific string to the variable name.
- Locate the Variable name in the Remediation instructions configuration page when customizing remediation messages.
- Append
device.assurance.custom.remediationto the condition's Variable name.
For example, use device.assurance.custom.remediation.ANDROID.Okta:DeviceAssurance.Jailbreak for the Rooting condition.
What does a custom widget configuration object look like?
Review the following example of a custom widget configuration object containing localized custom remediation strings:
var config = {
...
i18n: {
es: {
'idx.error.code.access_denied.device_assurance.remediation.android.upgrade_os_version': 'Es política de nuestra empresa actualizar su dispositivo a la última versión de Android.',
'device.assurance.custom.remediation.ANDROID.Okta:DeviceAssurance.Jailbreak': 'Es política de nuestra empresa garantizar que su dispositivo Android no esté jailbreakeado.'
}
}
...
};
