Skip to content

Commit e4ea83a

Browse files
Merge pull request #6204 from okta/tbs-okta-1185573-test-widget-customizations
OCI journey - OIE upgrade: test customizations guide
2 parents 00923e7 + fff2b0a commit e4ea83a

9 files changed

Lines changed: 192 additions & 13 deletions

File tree

packages/@okta/vuepress-site/docs/guides/custom-widget-gen3/main/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,3 +420,4 @@ The following examples illustrate the impact of basic changes:
420420

421421
- [Customize your domain and email address](/docs/guides/custom-url-domain/main/)
422422
- [Sign-In Widget, third generation](https://help.okta.com/okta_help.htm?type=oie&id=ext-compare-siw)
423+
- [Test your widget's existing customizations in a test environment](/docs/guides/oie-upgrade-test-widget-custom/main/)

packages/@okta/vuepress-site/docs/guides/custom-widget-migration-gen3/main/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,3 +343,4 @@ The third generation can use the `afterRender` function for non-DOM manipulation
343343
* [Customize a domain and email address](/docs/guides/custom-url-domain/main/)
344344
* [Brands](/docs/concepts/brands/)
345345
* [Sign-In Widget, third generation](https://help.okta.com/okta_help.htm?type=oie&id=ext-compare-siw)
346+
* [Test your widget's existing customizations in a test environment](/docs/guides/oie-upgrade-test-widget-custom/main/)

packages/@okta/vuepress-site/docs/guides/custom-widget/main/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -777,3 +777,4 @@ For information about other Okta customization options:
777777
* [Customize the Okta-hosted error pages](/docs/guides/custom-error-pages/)
778778
* [Customize SMS messages](/docs/guides/custom-sms-messaging)
779779
* [Customize email notifications](/docs/guides/custom-email/)
780+
* [Test your widget's existing customizations in a test environment](/docs/guides/oie-upgrade-test-widget-custom/main/)

packages/@okta/vuepress-site/docs/guides/ie-limitations/main/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,4 +142,4 @@ If you use the `/api/v1/authn` APIs to build custom password reset and account u
142142

143143
## Okta Sign-In Widget upgrade
144144

145-
For Identity Engine, some specific objects that were previously in the Sign-In Widget configuration are no longer supported and must be removed. Also, specific feature flags aren't supported when you upgrade Sign-In Widget and must be removed from `features` in the JSON code. See [Upgrade your Okta Sign-In Widget](/docs/guides/oie-upgrade-sign-in-widget/main/) for a comprehensive list of configuration and feature changes.
145+
For Identity Engine, some specific objects that were previously in the Sign-In Widget configuration are no longer supported and must be removed. Also, specific feature flags aren't supported when you upgrade Sign-In Widget and must be removed from `features` in the JSON code. See [Upgrade your Okta Sign-In Widget](/docs/guides/oie-upgrade-sign-in-widget/main/) for a comprehensive list of configuration and feature changes. Before you upgrade production, see [Test your widget's existing customizations in a test environment](/docs/guides/oie-upgrade-test-widget-custom/main/).

packages/@okta/vuepress-site/docs/guides/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ guides:
176176
- oie-upgrade-sign-in-widget-i18n
177177
- oie-upgrade-sign-in-widget
178178
- oie-upgrade-sign-in-widget-styling
179+
- oie-upgrade-test-widget-custom
179180
- oie-upgrade-registration-inline-hook
180181
- oie-upgrade-mfa-enroll-policy
181182
- ie-limitations

packages/@okta/vuepress-site/docs/guides/oie-upgrade-sign-in-widget-deprecated-methods/main/index.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ title: Deprecated JavaScript methods in the widget
44

55
<ApiLifecycle access="ie" />
66

7-
This guide covers the JavaScript method that is deprecated from the Okta Sign-In Widget and describes how to use `showSignIn` (and related methods) instead.
7+
This guide covers the JavaScript methods and hooks that are deprecated from the Okta Sign-In Widget after an Identity Engine upgrade. It describes how to use `showSignIn` (and related methods) instead of `setCookieAndRedirect`, and explains why the `processCreds` hook is no longer available.
88

99
---
1010

11-
#### Learning outcomes
11+
**Learning outcome**
1212

1313
Understand the `showSignIn` methods that are used in the widget so that you can set the redirect URI based on the sign-in policies that the administrator defines.
1414

15-
#### What you need
15+
**What you need**
1616

1717
[Widget that is updated to the latest available release](/docs/guides/oie-upgrade-sign-in-widget/main/)
1818

19-
#### Sample code
19+
**Sample code**
2020

2121
[Code samples using showSignIn](#code-samples-using-showsignin)
2222

@@ -32,7 +32,7 @@ After you upgrade your org to Okta Identity Engine, the [`setCookieAndRedirect`]
3232
3333
## About showSignIn methods
3434

35-
There are three similar methods in the widget. `showSignIn` applies to most use cases, but you might want to use `showSignInAndRedirect` or `showSignInAndGetTokens()`. The following describes the methods and when to use them:
35+
There are three similar methods in the widget. `showSignIn` applies to most use cases, but you might want to use `showSignInAndRedirect` or `showSignInToGetTokens`. The following describes the methods and when to use them:
3636

3737
* [showSignIn](https://github.com/okta/okta-signin-widget#showsignin): Use this method for most use cases. On success, the Promise resolves. On error, the Promise is rejected. If the result is a redirect, the method redirects to Okta or another Identity Provider (IdP). The responses and errors are the same as those for [renderEl()](https://github.com/okta/okta-signin-widget#renderel).
3838

@@ -46,13 +46,13 @@ There are three similar methods in the widget. `showSignIn` applies to most use
4646

4747
```javascript
4848
var oktaSignIn = new OktaSignIn({
49-
// Assumes there is an empty element on the page with an ID of 'osw-container' el: `#osw-container`,
49+
// Assumes there's an empty element on the page with an ID of 'osw-container'
5050
el: '#osw-container',
51-
clientId: `{clientId of your OIDC app integration}`,
52-
redirectUri: `{redirectUri configured in your OIDC app integration}`,
53-
baseUrl: `https://{yourOktaDomain}`,
51+
clientId: '{clientId of your OIDC app integration}',
52+
redirectUri: '{redirectUri configured in your OIDC app integration}',
53+
baseUrl: 'https://{yourOktaDomain}',
5454
authParams: {
55-
issuer: `https://{yourOktaDomain}/oauth2/default`
55+
issuer: 'https://{yourOktaDomain}/oauth2/default'
5656
}
5757
});
5858

@@ -61,8 +61,7 @@ var searchParams = new URL(window.location.href).searchParams;
6161
oktaSignIn.otp = searchParams.get('otp');
6262
oktaSignIn.state = searchParams.get('state');
6363

64-
oktaSignIn.showSignIn().then(res
65-
=> {
64+
oktaSignIn.showSignIn().then((res) => {
6665
oktaSignIn.authClient.handleLoginRedirect(res.tokens);
6766
})
6867
.catch(function(error) {
@@ -94,3 +93,9 @@ if (authClient.isLoginRedirect()) {
9493
authClient.tokenManager.setTokens(res.tokens);
9594
}
9695
```
96+
97+
## The processCreds hook
98+
99+
After you upgrade your org to Identity Engine, you can't subscribe to the `processCreds` hook in the Sign-In Widget. Remove any custom code that depends on it.
100+
101+
> **Note:** `processCreds` is a client-side Sign-In Widget hook, not a server-side Okta inline hook.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: Test widget customizations
3+
excerpt: Test your Sign-In Widget customizations in an Identity Engine test environment to identify and fix issues before you upgrade production.
4+
layout: Guides
5+
sections:
6+
- main
7+
---
Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
---
2+
title: Test your widget's existing customizations in a test environment
3+
---
4+
5+
<ApiLifecycle access="ie" />
6+
7+
Does your Okta Sign-In Widget have customizations such as CSS, JavaScript, i18n, branding, or custom sign-in pages? Test them in an Okta [Identity Engine](/docs/concepts/oie-intro/) (OIE) org before you upgrade production. This guide explains what to test, how to set up your test, and how to fix common issues.
8+
9+
---
10+
11+
**Learning outcome**
12+
13+
Validate that your Sign-In Widget customizations work in Identity Engine, and resolve any issues before you upgrade your production org.
14+
15+
**What you need**
16+
17+
* A test environment ready for Identity Engine. Use a preview org, a free trial Identity Engine org, or an [Integrator Free Plan org](/docs/reference/org-defaults/).
18+
* Your current Sign-In Widget version
19+
* A record of your existing customizations: CSS overrides, JavaScript hooks, i18n properties, and branding
20+
21+
---
22+
23+
## Identify your widget deployment model
24+
25+
Your testing approach depends on how your Sign-In Widget is deployed.
26+
27+
| Deployment model | Description | Testing approach |
28+
| --- | --- | --- |
29+
| Okta-hosted (redirect) | Okta hosts the sign-in page. You customize it through the Admin Console or the code editor. | Test your customizations in a preview org after you upgrade it to Identity Engine. |
30+
| Embedded (self-hosted) | Your app hosts the Sign-In Widget directly. | Test in your app's development environment pointed at an Identity Engine org. |
31+
32+
See [Redirect vs. embedded deployment](/docs/concepts/redirect-vs-embedded/) for more details.
33+
34+
## Identify your customization types
35+
36+
Check which customizations you have and what the Identity Engine upgrade may affect.
37+
38+
| Customization type | What may change in newer widget versions and Identity Engine | Action |
39+
| --- | --- | --- |
40+
| CSS overrides | Unsupported CSS may break after a widget version update. The third generation (Gen3) of the Sign-In Widget doesn't support the CSS code editor. | Test styling after the upgrade. Migrate to [design tokens](/docs/guides/custom-widget-gen3/main/#use-design-tokens) if you're on Gen3. |
41+
| JavaScript hooks (the widget's `before` and `after` lifecycle hooks, plus older events such as `afterRender` or `processCreds`) | Some events behave differently or are deprecated in Identity Engine. The `after` hook is supported only in Identity Engine. These client-side widget hooks aren't the same as server-side registration inline hooks. | Remove deprecated methods and validate hook behavior. |
42+
| i18n translations | New Identity Engine-specific property keys are available. Some Classic Engine strings no longer apply. | Verify that translations display correctly and add new Identity Engine string overrides. |
43+
| Branding (logo, colors, background) | Supported through the Admin Console in both Classic Engine and Identity Engine. No breaking change is expected. | Confirm that branding renders after the upgrade. |
44+
| Custom sign-in page (hosted) | Classic Engine custom sign-in pages may not work after the upgrade. | Validate that the page loads and functions correctly. |
45+
| Security image | Removed in Identity Engine. No security image is displayed. | Remove references. No replacement is needed. |
46+
| Remember me checkbox | Replaced by [**Keep me signed in**](/docs/guides/keep-me-signed-in/main/) in Identity Engine. | Update your UI expectations. No code change is needed. |
47+
48+
See [Upgrade the Okta Sign-In Widget](/docs/guides/oie-upgrade-sign-in-widget/main/) for more details on Sign-In Widget changes after the upgrade.
49+
50+
## Test your customizations in a test environment
51+
52+
### Step 1: Set up the test environment
53+
54+
Use one of these environments:
55+
56+
* **Preview org (recommended):** Upgrade your preview org to Identity Engine and test your customizations there.
57+
* **Identity Engine free trial org:** Create a free trial org and apply your customizations manually.
58+
59+
For Okta-hosted widgets, apply your customizations in the Admin Console code editor of the test org. For embedded widgets, point your development app at the Identity Engine test org.
60+
61+
### Step 2: Check for deprecated JavaScript methods
62+
63+
Search your custom code for deprecated methods that don't work in later versions of the Sign-In Widget and Identity Engine. Check these common areas:
64+
65+
* Factor Sequencing customizations
66+
* `afterRender` event handlers
67+
* The `useClassicEngine` configuration flag
68+
69+
See [Deprecated JavaScript methods in the Sign-In Widget](/docs/guides/oie-upgrade-sign-in-widget-deprecated-methods/main/) for the full list.
70+
71+
> **Note:** These are client-side Sign-In Widget hooks (for example, `before` and `after`). They aren't the server-side [registration inline hooks](/docs/guides/oie-upgrade-sign-in-widget/main/#registration-inline-hooks) that fire during registration. Test each type separately.
72+
73+
### Step 3: Test sign-in flows
74+
75+
Sign in as a test user and validate each customized flow:
76+
77+
* [Standard sign-in](/docs/guides/sign-in-overview/main/) (username and password)
78+
* [MFA enrollment and challenge](/docs/concepts/mfa/)
79+
* [Password recovery](https://help.okta.com/okta_help.htm?id=ext-add-self-service-password-reset)
80+
* [Self-service registration](/docs/concepts/self-service-registration/) (if enabled)
81+
* [Social or external Identity Provider authentication](/docs/concepts/identity-providers/) (if configured)
82+
* [Identifier-first flow behavior](/docs/concepts/sign-in-widget/) (new in Identity Engine)
83+
84+
### Step 4: Test styling and branding
85+
86+
* Confirm that the logo, colors, and background render correctly.
87+
* Check that your custom CSS overrides are applied.
88+
* Verify Sign-In Widget dimensions and layout.
89+
* Test on both desktop and mobile screen sizes.
90+
91+
> **Note:** Unsupported CSS customizations beyond the documented styles may break after a widget version update. See [Updates to Sign-In Widget styling](/docs/guides/oie-upgrade-sign-in-widget-styling/main/) for more details.
92+
93+
### Step 5: Test i18n translations
94+
95+
* Verify that your custom translations appear in all supported languages.
96+
* Check that new Identity Engine-specific strings (for example, `oie.password.challenge.title`) show default or custom values.
97+
* Confirm that removed Classic Engine strings don't cause errors.
98+
99+
See [Updates to Sign-In Widget i18n properties](/docs/guides/oie-upgrade-sign-in-widget-i18n/main/) for more details.
100+
101+
### Step 6: Test custom sign-in page behavior
102+
103+
If you use a custom Okta-hosted sign-in page:
104+
105+
* Confirm that the page loads without errors.
106+
* Check for `target is undefined` errors, which are common after an Identity Engine upgrade.
107+
* Validate that your redirect URIs work correctly.
108+
* Test that the Admin Console sign-in still works when **Default App for Sign-In Widget** is enabled.
109+
110+
## Fix issues found during testing
111+
112+
| Issue | Likely cause | Resolution |
113+
| --- | --- | --- |
114+
| Widget doesn't load | Deprecated JavaScript or missing configuration | Remove deprecated methods and verify that your widget version is 5.11.0 or later. |
115+
| `target is undefined` error | Custom sign-in page code references a removed object | Update your custom page code. |
116+
| Styling is missing or broken | CSS overrides are no longer applied in Gen3 | Migrate to design tokens or a supported styling API. |
117+
| i18n strings show raw keys | Classic Engine property keys are removed in Identity Engine | Map them to the new Identity Engine property keys. |
118+
| Sign-in page looks different | Identity Engine introduces the identifier-first flow and removes the security image | This is expected behavior. Update your user communications. |
119+
| Factor Sequencing isn't functional | Factor Sequencing rules aren't supported in Identity Engine | Remove Factor Sequencing customizations. |
120+
| Redirect URI issue | Redirect configuration changed in Identity Engine | Update your redirect URI configuration. |
121+
122+
See [Identity Engine limitations](/docs/guides/ie-limitations/main/) to learn more about feature changes in Identity Engine.
123+
124+
## Gen2 vs. Gen3 widget considerations
125+
126+
If you're moving to the third generation (Gen3) of the Sign-In Widget as part of your Identity Engine upgrade, be aware of other testing needs.
127+
128+
| Feature | Gen2 | Gen3 |
129+
| --- | --- | --- |
130+
| Deployment | Redirect and embedded | Redirect (Okta-hosted) only |
131+
| CSS editor | Supported | Not supported. Use design tokens. |
132+
| JavaScript events | Full event support | Reduced event support. `afterRender` may behave differently. |
133+
| Customization migration | n/a | Gen2 customizations don't carry over to Gen3. |
134+
| Accessibility | Standard | Improved color contrast, focus management, and screen reader support |
135+
136+
> **Important:** Customizations that you made in Gen2 don't appear if you move to Gen3. You must reconfigure them. See [Migrate to the third generation (Gen3) Sign-In Widget](/docs/guides/custom-widget-migration-gen3/main/) and [Style the Sign-In Widget (third generation)](/docs/guides/custom-widget-gen3/main/) for more details.
137+
138+
## Validation checklist before upgrading production
139+
140+
After you test in your test environment, confirm that all the following items pass before you schedule the production upgrade:
141+
142+
* All sign-in flows work (sign-in, MFA, recovery, and registration).
143+
* Custom CSS renders correctly.
144+
* Custom JavaScript has no deprecated methods.
145+
* i18n translations display in all languages.
146+
* Custom sign-in pages load without errors.
147+
* Redirect URIs resolve correctly.
148+
* No console errors appear in browser developer tools.
149+
* Mobile and desktop layouts render correctly.
150+
151+
## See also
152+
153+
* [Upgrade the Okta Sign-In Widget](/docs/guides/oie-upgrade-sign-in-widget/main/)
154+
* [Updates to Sign-In Widget styling](/docs/guides/oie-upgrade-sign-in-widget-styling/main/)
155+
* [Updates to Sign-In Widget i18n properties](/docs/guides/oie-upgrade-sign-in-widget-i18n/main/)
156+
* [Deprecated JavaScript methods in the Sign-In Widget](/docs/guides/oie-upgrade-sign-in-widget-deprecated-methods/main/)
157+
* [Identity Engine limitations](/docs/guides/ie-limitations/main/)
158+
* [Identity Engine upgrade overview](/docs/guides/oie-upgrade-overview/main/)
159+
* [Style the Sign-In Widget (third generation)](/docs/guides/custom-widget-gen3/main/)

packages/@okta/vuepress-theme-prose/const/navbar.const.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,10 @@ export const guides = [
591591
title: "Updates to widget i18n",
592592
guideName: "oie-upgrade-sign-in-widget-i18n",
593593
},
594+
{
595+
title: "Test widget customizations",
596+
guideName: "oie-upgrade-test-widget-custom",
597+
},
594598
],
595599
},
596600
{

0 commit comments

Comments
 (0)