Target Is Undefined Error With Hosted Sign-In Widget After OIE Upgrade
Last Updated:
Overview
An error occurs when using the OktaUtil.getRequestContext().target.clientId function with the Okta-hosted Sign-in Widget after an upgrade to the Okta Identity Engine (OIE). When this function is used, the system returns the following error:
target is undefined
Applies To
- Okta Identity Engine (OIE)
- Sign-in Widget
Cause
After an upgrade to OIE, the getRequestContext() object changes. The target property is no longer available within this object, which causes any code referencing it to fail.
Solution
In the Sign-in Widget code, replace the OktaUtil.getRequestContext().target.clientId function with the following updated function:
