@okta/okta-signin-widget 7.16.0 → 7.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (246) hide show
  1. package/README.md +5 -5
  2. package/dist/css/fonts.css +172 -0
  3. package/dist/css/okta-sign-in.next.css +1 -240
  4. package/dist/css/okta-sign-in.next.css.map +1 -1
  5. package/dist/esm/src/config/config.json.js +1 -1
  6. package/dist/js/okta-sign-in.classic.js +1 -1
  7. package/dist/js/okta-sign-in.classic.min.js +1 -1
  8. package/dist/js/okta-sign-in.js +1 -1
  9. package/dist/js/okta-sign-in.min.js +1 -1
  10. package/dist/js/okta-sign-in.next.js +61 -19
  11. package/dist/js/okta-sign-in.next.js.map +1 -1
  12. package/dist/js/okta-sign-in.next.no-polyfill.js +60 -18
  13. package/dist/js/okta-sign-in.next.no-polyfill.js.map +1 -1
  14. package/dist/js/okta-sign-in.no-polyfill.min.js +1 -1
  15. package/dist/js/okta-sign-in.oie.js +1 -1
  16. package/dist/js/okta-sign-in.oie.min.js +1 -1
  17. package/package.json +10 -5
  18. package/src/config/config.json +1 -1
  19. package/src/v3/components/AuthCoin/AuthCoin.tsx +15 -17
  20. package/src/v3/components/AuthContainer/AuthContainer.tsx +11 -17
  21. package/src/v3/components/AuthContent/AuthContent.tsx +21 -16
  22. package/src/v3/components/AuthHeader/AuthHeader.tsx +18 -19
  23. package/src/v3/components/AuthenticatorButton/AuthenticatorButton.tsx +116 -77
  24. package/src/v3/components/AuthenticatorButton/AuthenticatorButtonList.tsx +9 -3
  25. package/src/v3/components/Button/Button.tsx +16 -20
  26. package/src/v3/components/CaptchaContainer/CaptchaContainer.tsx +1 -1
  27. package/src/v3/components/Checkbox/Checkbox.tsx +33 -82
  28. package/src/v3/components/ConsentHeader/ConsentHeader.tsx +23 -23
  29. package/src/v3/components/Divider/Divider.tsx +2 -2
  30. package/src/v3/components/Form/Accordion.tsx +15 -36
  31. package/src/v3/components/Form/ElementContainer.tsx +6 -3
  32. package/src/v3/components/Form/Form.tsx +2 -4
  33. package/src/v3/components/Form/Layout.tsx +1 -1
  34. package/src/v3/components/Form/LayoutContainer.tsx +4 -2
  35. package/src/v3/components/Heading/Heading.tsx +7 -5
  36. package/src/v3/components/Icon/CustomAppIcon.tsx +13 -15
  37. package/src/v3/components/Icon/CustomOTPIcon.tsx +5 -10
  38. package/src/v3/components/Icon/DuoIcon.tsx +5 -10
  39. package/src/v3/components/Icon/EmailIcon.tsx +5 -10
  40. package/src/v3/components/Icon/GoogleOTPIcon.tsx +5 -10
  41. package/src/v3/components/Icon/IDPIcon.tsx +5 -10
  42. package/src/v3/components/Icon/OktaVerifyIcon.tsx +0 -7
  43. package/src/v3/components/Icon/OnPremMFAIcon.tsx +5 -10
  44. package/src/v3/components/Icon/PasswordIcon.tsx +5 -10
  45. package/src/v3/components/Icon/PhoneIcon.tsx +5 -10
  46. package/src/v3/components/Icon/RSAIcon.tsx +6 -11
  47. package/src/v3/components/Icon/SecurityKeyOrBiometricsIcon.tsx +5 -10
  48. package/src/v3/components/Icon/SecurityQuestionIcon.tsx +5 -10
  49. package/src/v3/components/Icon/SmartCardIcon.tsx +5 -10
  50. package/src/v3/components/Icon/SymantecIcon.tsx +5 -10
  51. package/src/v3/components/Icon/YubiKeyIcon.tsx +5 -10
  52. package/src/v3/components/Icon/index.tsx +0 -2
  53. package/src/v3/components/IdentifierContainer/IdentifierContainer.tsx +31 -47
  54. package/src/v3/components/Image/Image.tsx +42 -0
  55. package/src/v3/{src/components/CustomPluginsOdysseyCacheProvider → components/Image}/index.tsx +2 -2
  56. package/src/v3/components/ImageWithText/ImageWithText.tsx +7 -4
  57. package/src/v3/components/Images/AppIcon.tsx +16 -46
  58. package/src/v3/components/Images/DeviceIcon.tsx +16 -32
  59. package/src/v3/components/Images/LocationIcon.tsx +16 -26
  60. package/src/v3/components/Images/PhoneIcon.tsx +34 -29
  61. package/src/v3/components/Images/YubikeyDemoImage.tsx +32 -27
  62. package/src/v3/components/Images/index.tsx +0 -1
  63. package/src/v3/components/InfoBox/InfoBox.tsx +12 -12
  64. package/src/v3/components/InfoSection/InfoSection.tsx +20 -14
  65. package/src/v3/components/InformationalText/InformationalText.tsx +16 -6
  66. package/src/v3/components/InputPassword/InputPassword.tsx +31 -164
  67. package/src/v3/components/InputText/InputText.tsx +27 -103
  68. package/src/v3/components/LaunchAuthenticatorButton/LaunchAuthenticatorButton.tsx +14 -26
  69. package/src/v3/components/Link/Link.tsx +8 -20
  70. package/src/v3/components/List/List.tsx +16 -12
  71. package/src/v3/components/PIVButton/PIVButton.tsx +10 -8
  72. package/src/v3/components/PasswordRequirements/Icon.tsx +17 -23
  73. package/src/v3/components/PasswordRequirements/PasswordMatches.tsx +9 -2
  74. package/src/v3/components/PasswordRequirements/PasswordRequirementListItem.tsx +6 -5
  75. package/src/v3/components/PasswordRequirements/PasswordRequirements.tsx +5 -3
  76. package/src/v3/components/PhoneAuthenticator/PhoneAuthenticator.tsx +53 -137
  77. package/src/v3/components/QRCode/QRCode.tsx +27 -20
  78. package/src/v3/components/Radio/Radio.tsx +31 -93
  79. package/src/v3/components/ReminderPrompt/ReminderPrompt.tsx +9 -12
  80. package/src/v3/components/Select/Select.tsx +45 -92
  81. package/src/v3/components/Spinner/Spinner.tsx +6 -8
  82. package/src/v3/components/StepperButton/StepperButton.tsx +6 -10
  83. package/src/v3/components/StepperLink/StepperLink.tsx +1 -1
  84. package/src/v3/components/StepperRadio/StepperRadio.tsx +22 -43
  85. package/src/v3/components/TextWithActionLink/TextWithActionLink.tsx +1 -1
  86. package/src/v3/components/Title/Title.tsx +5 -9
  87. package/src/v3/components/WebAuthNSubmitButton/WebAuthNSubmitButton.tsx +10 -9
  88. package/src/v3/components/Widget/GlobalStyles.tsx +16 -21
  89. package/src/v3/components/Widget/index.tsx +51 -36
  90. package/src/v3/components/Widget/style.scss +295 -0
  91. package/src/v3/components/WidgetMessageContainer/WidgetMessageContainer.tsx +11 -8
  92. package/src/v3/components/hocs/withFormValidationState.tsx +2 -5
  93. package/src/v3/jest.config.js +1 -0
  94. package/src/v3/jest.setup.js +1 -0
  95. package/src/v3/package.json +11 -7
  96. package/src/v3/screenshots/base/UI_demo/UI_demo_RTL_VRT.png +0 -0
  97. package/src/v3/screenshots/base/UI_demo/UI_demo_VRT.png +0 -0
  98. package/src/v3/src/components/AuthCoin/AuthCoin.tsx +15 -17
  99. package/src/v3/src/components/AuthCoin/__snapshots__/AuthCoin.test.tsx.snap +20 -47
  100. package/src/v3/src/components/AuthContainer/AuthContainer.tsx +11 -17
  101. package/src/v3/src/components/AuthContent/AuthContent.tsx +21 -16
  102. package/src/v3/src/components/AuthHeader/AuthHeader.tsx +18 -19
  103. package/src/v3/src/components/AuthenticatorButton/AuthenticatorButton.tsx +116 -77
  104. package/src/v3/src/components/AuthenticatorButton/AuthenticatorButtonList.tsx +9 -3
  105. package/src/v3/src/components/Button/Button.tsx +16 -20
  106. package/src/v3/src/components/CaptchaContainer/CaptchaContainer.tsx +1 -1
  107. package/src/v3/src/components/Checkbox/Checkbox.tsx +33 -82
  108. package/src/v3/src/components/ConsentHeader/ConsentHeader.tsx +23 -23
  109. package/src/v3/src/components/Divider/Divider.tsx +2 -2
  110. package/src/v3/src/components/Form/Accordion.tsx +15 -36
  111. package/src/v3/src/components/Form/ElementContainer.tsx +6 -3
  112. package/src/v3/src/components/Form/Form.tsx +2 -4
  113. package/src/v3/src/components/Form/Layout.tsx +1 -1
  114. package/src/v3/src/components/Form/LayoutContainer.tsx +4 -2
  115. package/src/v3/src/components/Heading/Heading.tsx +7 -5
  116. package/src/v3/src/components/Icon/CustomAppIcon.tsx +13 -15
  117. package/src/v3/src/components/Icon/CustomOTPIcon.tsx +5 -10
  118. package/src/v3/src/components/Icon/DuoIcon.tsx +5 -10
  119. package/src/v3/src/components/Icon/EmailIcon.tsx +5 -10
  120. package/src/v3/src/components/Icon/GoogleOTPIcon.tsx +5 -10
  121. package/src/v3/src/components/Icon/IDPIcon.tsx +5 -10
  122. package/src/v3/src/components/Icon/OktaVerifyIcon.tsx +0 -7
  123. package/src/v3/src/components/Icon/OnPremMFAIcon.tsx +5 -10
  124. package/src/v3/src/components/Icon/PasswordIcon.tsx +5 -10
  125. package/src/v3/src/components/Icon/PhoneIcon.tsx +5 -10
  126. package/src/v3/src/components/Icon/RSAIcon.tsx +6 -11
  127. package/src/v3/src/components/Icon/SecurityKeyOrBiometricsIcon.tsx +5 -10
  128. package/src/v3/src/components/Icon/SecurityQuestionIcon.tsx +5 -10
  129. package/src/v3/src/components/Icon/SmartCardIcon.tsx +5 -10
  130. package/src/v3/src/components/Icon/SymantecIcon.tsx +5 -10
  131. package/src/v3/src/components/Icon/YubiKeyIcon.tsx +5 -10
  132. package/src/v3/src/components/Icon/index.tsx +0 -2
  133. package/src/v3/src/components/IdentifierContainer/IdentifierContainer.tsx +31 -47
  134. package/src/v3/src/components/Image/Image.tsx +42 -0
  135. package/src/v3/{components/CustomPluginsOdysseyCacheProvider → src/components/Image}/index.tsx +2 -2
  136. package/src/v3/src/components/ImageWithText/ImageWithText.tsx +7 -4
  137. package/src/v3/src/components/Images/AppIcon.tsx +16 -46
  138. package/src/v3/src/components/Images/DeviceIcon.tsx +16 -32
  139. package/src/v3/src/components/Images/LocationIcon.tsx +16 -26
  140. package/src/v3/src/components/Images/PhoneIcon.tsx +34 -29
  141. package/src/v3/src/components/Images/YubikeyDemoImage.tsx +32 -27
  142. package/src/v3/src/components/Images/index.tsx +0 -1
  143. package/src/v3/src/components/InfoBox/InfoBox.tsx +12 -12
  144. package/src/v3/src/components/InfoSection/InfoSection.tsx +20 -14
  145. package/src/v3/src/components/InformationalText/InformationalText.tsx +16 -6
  146. package/src/v3/src/components/InputPassword/InputPassword.tsx +31 -164
  147. package/src/v3/src/components/InputText/InputText.tsx +27 -103
  148. package/src/v3/src/components/LaunchAuthenticatorButton/LaunchAuthenticatorButton.tsx +14 -26
  149. package/src/v3/src/components/Link/Link.tsx +8 -20
  150. package/src/v3/src/components/List/List.tsx +16 -12
  151. package/src/v3/src/components/PIVButton/PIVButton.tsx +10 -8
  152. package/src/v3/src/components/PasswordRequirements/Icon.tsx +17 -23
  153. package/src/v3/src/components/PasswordRequirements/PasswordMatches.tsx +9 -2
  154. package/src/v3/src/components/PasswordRequirements/PasswordRequirementListItem.tsx +6 -5
  155. package/src/v3/src/components/PasswordRequirements/PasswordRequirements.tsx +5 -3
  156. package/src/v3/src/components/PhoneAuthenticator/PhoneAuthenticator.tsx +53 -137
  157. package/src/v3/src/components/QRCode/QRCode.tsx +27 -20
  158. package/src/v3/src/components/Radio/Radio.tsx +31 -93
  159. package/src/v3/src/components/ReminderPrompt/ReminderPrompt.tsx +9 -12
  160. package/src/v3/src/components/ReminderPrompt/__snapshots__/ReminderPrompt.test.tsx.snap +37 -17
  161. package/src/v3/src/components/Select/Select.tsx +45 -92
  162. package/src/v3/src/components/Spinner/Spinner.tsx +6 -8
  163. package/src/v3/src/components/StepperButton/StepperButton.tsx +6 -10
  164. package/src/v3/src/components/StepperLink/StepperLink.tsx +1 -1
  165. package/src/v3/src/components/StepperRadio/StepperRadio.tsx +22 -43
  166. package/src/v3/src/components/TextWithActionLink/TextWithActionLink.tsx +1 -1
  167. package/src/v3/src/components/Title/Title.tsx +5 -9
  168. package/src/v3/src/components/WebAuthNSubmitButton/WebAuthNSubmitButton.tsx +10 -9
  169. package/src/v3/src/components/Widget/GlobalStyles.tsx +16 -21
  170. package/src/v3/src/components/Widget/index.tsx +51 -36
  171. package/src/v3/src/components/Widget/style.scss +295 -0
  172. package/src/v3/src/components/WidgetMessageContainer/WidgetMessageContainer.tsx +11 -8
  173. package/src/v3/src/components/hocs/withFormValidationState.tsx +2 -5
  174. package/src/v3/src/transformer/button/__snapshots__/transformIDPButtons.test.ts.snap +0 -2
  175. package/src/v3/src/transformer/i18n/__snapshots__/transformAuthenticatorButton.test.ts.snap +4 -4
  176. package/src/v3/src/transformer/i18n/transformAuthenticatorButton.test.ts +3 -3
  177. package/src/v3/src/transformer/i18n/transformAuthenticatorButton.ts +18 -2
  178. package/src/v3/src/transformer/layout/development/transformEnumerateComponents.ts +72 -5
  179. package/src/v3/src/transformer/layout/idp/__snapshots__/transformIdpRedirect.test.ts.snap +4 -4
  180. package/src/v3/src/transformer/selectAuthenticator/__snapshots__/transformSelectAuthenticatorVerify.test.ts.snap +0 -3
  181. package/src/v3/src/transformer/selectAuthenticator/__snapshots__/transformSelectOVCustomAppMethodVerify.test.ts.snap +0 -1
  182. package/src/v3/src/transformer/selectAuthenticator/__snapshots__/utils.test.ts.snap +163 -42
  183. package/src/v3/src/transformer/selectAuthenticator/transformSelectAuthenticatorEnroll.ts +7 -1
  184. package/src/v3/src/transformer/selectAuthenticator/transformSelectAuthenticatorVerify.ts +0 -1
  185. package/src/v3/src/transformer/selectAuthenticator/transformSelectOVCustomAppMethodVerify.ts +0 -1
  186. package/src/v3/src/transformer/selectAuthenticator/utils.test.ts +117 -39
  187. package/src/v3/src/transformer/selectAuthenticator/utils.ts +102 -58
  188. package/src/v3/src/transformer/terminal/transformEmailMagicLinkOTPOnlyElements.ts +1 -3
  189. package/src/v3/src/transformer/uischema/transform.test.ts +0 -6
  190. package/src/v3/src/transformer/uischema/transform.ts +0 -2
  191. package/src/v3/src/{components/FieldLevelMessageContainer/index.tsx → types/image.ts} +10 -3
  192. package/src/v3/src/types/index.ts +1 -0
  193. package/src/v3/src/types/schema.ts +2 -1
  194. package/src/v3/src/types/widget.ts +3 -3
  195. package/src/v3/src/util/buildFieldLevelErrorMessages.ts +48 -0
  196. package/src/v3/src/util/formUtils.ts +5 -17
  197. package/src/v3/src/util/htmlContentParserUtils.tsx +3 -1
  198. package/src/v3/src/util/index.ts +2 -0
  199. package/src/v3/src/util/isLtrField.ts +22 -0
  200. package/src/v3/src/util/languageUtils.ts +14 -0
  201. package/src/v3/src/util/leonardo.d.ts +571 -0
  202. package/src/v3/src/util/mergeThemes.test.tsx +20 -7
  203. package/src/v3/src/util/mergeThemes.ts +32 -1
  204. package/src/v3/src/util/stylisPlugins.ts +21 -0
  205. package/src/v3/src/util/theme.test.ts +63 -187
  206. package/src/v3/src/util/theme.ts +274 -247
  207. package/src/v3/svgo.config.js +0 -6
  208. package/src/v3/transformer/i18n/transformAuthenticatorButton.ts +18 -2
  209. package/src/v3/transformer/layout/development/transformEnumerateComponents.ts +72 -5
  210. package/src/v3/transformer/selectAuthenticator/transformSelectAuthenticatorEnroll.ts +7 -1
  211. package/src/v3/transformer/selectAuthenticator/transformSelectAuthenticatorVerify.ts +0 -1
  212. package/src/v3/transformer/selectAuthenticator/transformSelectOVCustomAppMethodVerify.ts +0 -1
  213. package/src/v3/transformer/selectAuthenticator/utils.ts +102 -58
  214. package/src/v3/transformer/terminal/transformEmailMagicLinkOTPOnlyElements.ts +1 -3
  215. package/src/v3/transformer/uischema/transform.ts +0 -2
  216. package/src/v3/tsconfig.base.json +3 -0
  217. package/src/v3/{components/FieldLevelMessageContainer/index.tsx → types/image.ts} +10 -3
  218. package/src/v3/types/index.ts +1 -0
  219. package/src/v3/types/schema.ts +2 -1
  220. package/src/v3/types/widget.ts +3 -3
  221. package/src/v3/util/buildFieldLevelErrorMessages.ts +48 -0
  222. package/src/v3/util/formUtils.ts +5 -17
  223. package/src/v3/util/htmlContentParserUtils.tsx +3 -1
  224. package/src/v3/util/index.ts +2 -0
  225. package/src/v3/util/isLtrField.ts +22 -0
  226. package/src/v3/util/languageUtils.ts +14 -0
  227. package/src/v3/util/leonardo.d.ts +571 -0
  228. package/src/v3/util/mergeThemes.ts +32 -1
  229. package/src/v3/util/stylisPlugins.ts +21 -0
  230. package/src/v3/util/theme.ts +274 -247
  231. package/src/v3/components/CustomPluginsOdysseyCacheProvider/CustomPluginsOdysseyCacheProvider.tsx +0 -66
  232. package/src/v3/components/FieldLevelMessageContainer/FieldLevelMessageContainer.tsx +0 -55
  233. package/src/v3/components/Icon/CheckCircle.tsx +0 -30
  234. package/src/v3/components/Icon/RightArrowIcon.tsx +0 -30
  235. package/src/v3/components/Images/MobileDeviceIcon.tsx +0 -38
  236. package/src/v3/components/Widget/style.css +0 -181
  237. package/src/v3/src/components/CustomPluginsOdysseyCacheProvider/CustomPluginsOdysseyCacheProvider.tsx +0 -66
  238. package/src/v3/src/components/FieldLevelMessageContainer/FieldLevelMessageContainer.tsx +0 -55
  239. package/src/v3/src/components/Icon/CheckCircle.tsx +0 -30
  240. package/src/v3/src/components/Icon/RightArrowIcon.tsx +0 -30
  241. package/src/v3/src/components/Images/MobileDeviceIcon.tsx +0 -38
  242. package/src/v3/src/components/Widget/style.css +0 -181
  243. package/src/v3/src/transformer/uischema/setLtrFields.ts +0 -41
  244. package/src/v3/src/util/designTokens.ts +0 -249
  245. package/src/v3/transformer/uischema/setLtrFields.ts +0 -41
  246. package/src/v3/util/designTokens.ts +0 -249
@@ -10,7 +10,11 @@
10
10
  * See the License for the specific language governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- import { AppIcon } from 'src/components/Images';
13
+ import {
14
+ AppIcon,
15
+ DeviceIcon,
16
+ LocationIcon,
17
+ } from 'src/components/Images';
14
18
  import { AUTHENTICATOR_KEY } from 'src/constants';
15
19
 
16
20
  import {
@@ -21,6 +25,7 @@ import {
21
25
  DividerElement,
22
26
  FieldElement,
23
27
  HeadingElement,
28
+ IdentifierContainerElement,
24
29
  IdxStepTransformer,
25
30
  ImageWithTextElement,
26
31
  InfoboxElement,
@@ -43,7 +48,7 @@ import {
43
48
  export const transformEnumerateComponents: IdxStepTransformer = ({
44
49
  formBag,
45
50
  }) => {
46
- const { uischema, dataSchema } = formBag;
51
+ const { uischema, dataSchema, data } = formBag;
47
52
 
48
53
  const reminderElement: ReminderElement = {
49
54
  type: 'Reminder',
@@ -183,6 +188,10 @@ export const transformEnumerateComponents: IdxStepTransformer = ({
183
188
  ruleKey: 'excludeUsername',
184
189
  label: 'Cannot contain username',
185
190
  },
191
+ {
192
+ ruleKey: '',
193
+ label: 'Should not match your previous password',
194
+ },
186
195
  ],
187
196
  validationDelayMs: 0,
188
197
  },
@@ -203,6 +212,7 @@ export const transformEnumerateComponents: IdxStepTransformer = ({
203
212
  },
204
213
  };
205
214
  uischema.elements.push(inputPasswordElement);
215
+ data['credentials.passcode'] = 'a';
206
216
  const confirmPassword: FieldElement = {
207
217
  type: 'Field',
208
218
  key: 'confirmPassword',
@@ -217,6 +227,7 @@ export const transformEnumerateComponents: IdxStepTransformer = ({
217
227
  },
218
228
  };
219
229
  uischema.elements.push(confirmPassword);
230
+ data.confirmPassword = 'a';
220
231
 
221
232
  const passwordMatches: PasswordMatchesElement = {
222
233
  type: 'PasswordMatches',
@@ -334,6 +345,29 @@ export const transformEnumerateComponents: IdxStepTransformer = ({
334
345
  Icon: '',
335
346
  },
336
347
  },
348
+ {
349
+ type: 'AuthenticatorButton',
350
+ label: 'Authenticator Button 5 for Enroll',
351
+ options: {
352
+ step: '',
353
+ type: ButtonType.BUTTON,
354
+ key: AUTHENTICATOR_KEY.CUSTOM_APP,
355
+ ctaLabel: 'Set up',
356
+ isEnroll: true,
357
+ },
358
+ },
359
+ {
360
+ type: 'AuthenticatorButton',
361
+ label: 'Authenticator Button 6 for Additional Enroll',
362
+ options: {
363
+ step: '',
364
+ type: ButtonType.BUTTON,
365
+ key: AUTHENTICATOR_KEY.WEBAUTHN,
366
+ ctaLabel: 'Set up another',
367
+ isEnroll: true,
368
+ isAdditionalEnroll: true,
369
+ },
370
+ },
337
371
  ],
338
372
  dataSe: 'authenticator-button-list',
339
373
  },
@@ -345,6 +379,11 @@ export const transformEnumerateComponents: IdxStepTransformer = ({
345
379
  options: {
346
380
  step: '',
347
381
  },
382
+ translations: [{
383
+ name: 'label',
384
+ i18nKey: '',
385
+ value: 'Launch Authenticator button with long name and icon',
386
+ }],
348
387
  };
349
388
  uischema.elements.push(launchAuthenticatorButton);
350
389
 
@@ -425,15 +464,43 @@ export const transformEnumerateComponents: IdxStepTransformer = ({
425
464
  };
426
465
  uischema.elements.push(textWithActionLink);
427
466
 
428
- const imageWithText: ImageWithTextElement = {
467
+ uischema.elements.push(divider);
468
+
469
+ const appImageWithText: ImageWithTextElement = {
429
470
  type: 'ImageWithText',
430
471
  options: {
431
472
  id: 'image.withText',
432
473
  SVGIcon: AppIcon,
433
- textContent: 'Image with text',
474
+ textContent: 'Application',
475
+ },
476
+ };
477
+ uischema.elements.push(appImageWithText);
478
+
479
+ const deviceImageWithText: ImageWithTextElement = {
480
+ type: 'ImageWithText',
481
+ options: {
482
+ id: 'image.withText',
483
+ SVGIcon: DeviceIcon,
484
+ textContent: 'Device',
434
485
  },
435
486
  };
436
- uischema.elements.push(imageWithText);
487
+ uischema.elements.push(deviceImageWithText);
488
+
489
+ const locationImageWithText: ImageWithTextElement = {
490
+ type: 'ImageWithText',
491
+ options: {
492
+ id: 'image.withText',
493
+ SVGIcon: LocationIcon,
494
+ textContent: 'Location',
495
+ },
496
+ };
497
+ uischema.elements.push(locationImageWithText);
498
+
499
+ const identifierElement: IdentifierContainerElement = {
500
+ type: 'IdentifierContainer',
501
+ options: { identifier: 'User' },
502
+ };
503
+ uischema.elements.push(identifierElement);
437
504
 
438
505
  return formBag;
439
506
  };
@@ -40,7 +40,12 @@ export const transformSelectAuthenticatorEnroll: IdxStepTransformer = ({
40
40
  }) => {
41
41
  const { uischema } = formBag;
42
42
  const { brandName } = widgetProps;
43
- const { nextStep: { inputs, name: stepName } = {} as NextStep, availableSteps } = transaction;
43
+ const {
44
+ nextStep: { inputs, name: stepName } = {} as NextStep,
45
+ availableSteps,
46
+ // @ts-ignore OKTA-499928 authenticatorEnrollments missing from rawIdxState
47
+ rawIdxState: { authenticatorEnrollments },
48
+ } = transaction;
44
49
 
45
50
  const authenticator = inputs?.find(({ name }) => name === 'authenticator');
46
51
  if (!authenticator?.options?.length) {
@@ -49,6 +54,7 @@ export const transformSelectAuthenticatorEnroll: IdxStepTransformer = ({
49
54
  const authenticatorButtons = getAuthenticatorEnrollButtonElements(
50
55
  authenticator.options,
51
56
  stepName,
57
+ authenticatorEnrollments?.value,
52
58
  );
53
59
  const skipStep = availableSteps?.find(({ name }) => name === 'skip');
54
60
 
@@ -75,7 +75,6 @@ export const transformSelectAuthenticatorVerify: IdxStepTransformer = ({
75
75
  const informationalTextElement: DescriptionElement = {
76
76
  type: 'Description',
77
77
  contentType: 'subtitle',
78
- noMargin: true,
79
78
  options: {
80
79
  content: isPwRecovery
81
80
  ? loc('oie.password.reset.verification', 'login')
@@ -133,7 +133,6 @@ export const transformSelectOVCustomAppMethodVerify: IdxStepTransformer = ({
133
133
  const descriptionElement: DescriptionElement = {
134
134
  type: 'Description',
135
135
  contentType: 'subtitle',
136
- noMargin: true,
137
136
  options: {
138
137
  content: loc('oie.select.authenticators.verify.subtitle', 'login'),
139
138
  },
@@ -10,7 +10,7 @@
10
10
  * See the License for the specific language governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- import { Input } from '@okta/okta-auth-js';
13
+ import { IdxAuthenticator, Input } from '@okta/okta-auth-js';
14
14
  import { IdxOption } from '@okta/okta-auth-js/types/lib/idx/types/idx-js';
15
15
 
16
16
  import {
@@ -93,6 +93,11 @@ export const getOptionValue = (
93
93
  ({ name }) => name === key,
94
94
  );
95
95
 
96
+ const isAuthenticatorAlreadyEnrolled = (
97
+ authenticator: IdxAuthenticator,
98
+ authenticatorEnrollments?: IdxAuthenticator[],
99
+ ) => !!authenticatorEnrollments?.some(({ key }) => key === authenticator.key);
100
+
96
101
  const getAuthenticatorDataSeVal = (authenticatorKey: string, methodType?: string): string => {
97
102
  if (authenticatorKey) {
98
103
  const method = methodType ? `-${methodType}` : '';
@@ -131,49 +136,18 @@ const reorderAuthenticatorButtons = (
131
136
  return updatedAuthenticatorBtns;
132
137
  };
133
138
 
134
- const buildOktaVerifyOptions = (
135
- options: IdxOption[],
136
- step: string,
137
- isEnroll?: boolean,
138
- ): AuthenticatorButtonElement[] => {
139
- const ovRemediation = options.find((option) => option.relatesTo?.key === AUTHENTICATOR_KEY.OV);
140
- const id = (ovRemediation?.value as Input[])?.find(({ name }) => name === 'id')?.value;
141
- const methodType = (ovRemediation?.value as Input[])?.find(({ name }) => name === 'methodType');
142
- if (!methodType?.options?.length) {
143
- return [];
139
+ const getAuthenticatorLabel = (
140
+ option: IdxOption,
141
+ authenticatorKey: string,
142
+ ): string => {
143
+ switch (authenticatorKey) {
144
+ case AUTHENTICATOR_KEY.CUSTOM_APP:
145
+ return option.relatesTo?.displayName ?? option.label;
146
+ case AUTHENTICATOR_KEY.OV:
147
+ return loc('oie.okta_verify.label', 'login');
148
+ default:
149
+ return option.label;
144
150
  }
145
-
146
- return methodType.options.map((option: IdxOption, index: number) => {
147
- const authenticatorButton: AuthenticatorButtonElement = {
148
- type: 'AuthenticatorButton',
149
- label: option.label,
150
- id: `auth_btn_${AUTHENTICATOR_KEY.OV}_${option.value || id}`,
151
- options: {
152
- type: ButtonType.BUTTON,
153
- key: AUTHENTICATOR_KEY.OV,
154
- ctaLabel: isEnroll
155
- ? loc('oie.enroll.authenticator.button.text', 'login')
156
- : loc('oie.verify.authenticator.button.text', 'login'),
157
- description: isEnroll
158
- ? loc(AUTHENTICATOR_ENROLLMENT_DESCR_KEY_MAP[AUTHENTICATOR_KEY.OV], 'login')
159
- : loc('oie.okta_verify.label', 'login'),
160
- ariaLabel: getAuthenticatorAriaLabel(option, AUTHENTICATOR_KEY.OV, option.value, isEnroll),
161
- actionParams: {
162
- 'authenticator.methodType': option.value,
163
- 'authenticator.id': id,
164
- } as ActionParams,
165
- step,
166
- includeData: true,
167
- includeImmutableData: false,
168
- dataSe: getAuthenticatorDataSeVal(AUTHENTICATOR_KEY.OV, option.value as string),
169
- iconName: option.value === 'totp' ? `oktaVerify_${index}` : `oktaVerifyPush_${index}`,
170
- iconDescr: option.value === 'totp'
171
- ? loc('factor.totpSoft.description', 'login')
172
- : loc('factor.push.description', 'login'),
173
- },
174
- };
175
- return authenticatorButton;
176
- });
177
151
  };
178
152
 
179
153
  const getAuthenticatorDescriptionParams = (
@@ -236,15 +210,76 @@ const getAuthenticatorDescription = (
236
210
  return option.relatesTo?.profile?.phoneNumber as string || undefined;
237
211
  case AUTHENTICATOR_KEY.EMAIL:
238
212
  return option.relatesTo?.profile?.email as string || undefined;
239
- case AUTHENTICATOR_KEY.CUSTOM_APP:
240
- return option.relatesTo?.displayName as string || undefined;
241
213
  case AUTHENTICATOR_KEY.OV:
242
- return loc('oie.okta_verify.label', 'login');
214
+ return option.label;
243
215
  default:
244
216
  return undefined;
245
217
  }
246
218
  };
247
219
 
220
+ const getCtaLabel = (
221
+ isEnroll?: boolean,
222
+ isAdditionalEnroll?: boolean,
223
+ ) => {
224
+ if (isAdditionalEnroll) {
225
+ return loc('enroll.choices.setup.another', 'login');
226
+ }
227
+ if (isEnroll) {
228
+ return loc('oie.enroll.authenticator.button.text', 'login');
229
+ }
230
+ return loc('oie.verify.authenticator.button.text', 'login');
231
+ };
232
+
233
+ const buildOktaVerifyOptions = (
234
+ options: IdxOption[],
235
+ step: string,
236
+ isEnroll?: boolean,
237
+ authenticatorEnrollments?: IdxAuthenticator[],
238
+ ): AuthenticatorButtonElement[] => {
239
+ const ovRemediation = options.find((option) => option.relatesTo?.key === AUTHENTICATOR_KEY.OV);
240
+ const isAdditionalEnroll = isEnroll && ovRemediation?.relatesTo
241
+ && isAuthenticatorAlreadyEnrolled(ovRemediation.relatesTo, authenticatorEnrollments);
242
+ const id = (ovRemediation?.value as Input[])?.find(({ name }) => name === 'id')?.value;
243
+ const methodType = (ovRemediation?.value as Input[])?.find(({ name }) => name === 'methodType');
244
+ if (!methodType?.options?.length) {
245
+ return [];
246
+ }
247
+
248
+ return methodType.options.map((option: IdxOption, index: number) => {
249
+ const authenticatorButton: AuthenticatorButtonElement = {
250
+ type: 'AuthenticatorButton',
251
+ label: getAuthenticatorLabel(option, AUTHENTICATOR_KEY.OV),
252
+ id: `auth_btn_${AUTHENTICATOR_KEY.OV}_${option.value || id}`,
253
+ options: {
254
+ type: ButtonType.BUTTON,
255
+ key: AUTHENTICATOR_KEY.OV,
256
+ isEnroll,
257
+ isAdditionalEnroll,
258
+ ctaLabel: getCtaLabel(isEnroll, isAdditionalEnroll),
259
+ description: getAuthenticatorDescription(
260
+ option,
261
+ AUTHENTICATOR_KEY.OV,
262
+ isEnroll,
263
+ ),
264
+ ariaLabel: getAuthenticatorAriaLabel(option, AUTHENTICATOR_KEY.OV, option.value, isEnroll),
265
+ actionParams: {
266
+ 'authenticator.methodType': option.value,
267
+ 'authenticator.id': id,
268
+ } as ActionParams,
269
+ step,
270
+ includeData: true,
271
+ includeImmutableData: false,
272
+ dataSe: getAuthenticatorDataSeVal(AUTHENTICATOR_KEY.OV, option.value as string),
273
+ iconName: option.value === 'totp' ? `oktaVerify_${index}` : `oktaVerifyPush_${index}`,
274
+ iconDescr: option.value === 'totp'
275
+ ? loc('factor.totpSoft.description', 'login')
276
+ : loc('factor.push.description', 'login'),
277
+ },
278
+ };
279
+ return authenticatorButton;
280
+ });
281
+ };
282
+
248
283
  const getNickname = (
249
284
  option: IdxOption,
250
285
  authenticatorKey: string,
@@ -280,6 +315,7 @@ const formatAuthenticatorOptions = (
280
315
  options: IdxOption[],
281
316
  step: string,
282
317
  isEnroll?: boolean,
318
+ authenticatorEnrollments?: IdxAuthenticator[],
283
319
  ): AuthenticatorButtonElement[] => {
284
320
  const authenticatorOptionSet = new Set<string>();
285
321
  return options
@@ -304,10 +340,13 @@ const formatAuthenticatorOptions = (
304
340
  return !isDup;
305
341
  })
306
342
  .map((option: IdxOption, index: number) => {
307
- const authenticatorKey = option.relatesTo?.key as string;
343
+ const authenticator = option.relatesTo;
344
+ const authenticatorKey = authenticator?.key as string;
308
345
  const id = getOptionValue(option.value as Input[], 'id')?.value;
309
346
  const methodType = getOptionValue(option.value as Input[], 'methodType')?.value;
310
347
  const enrollmentId = getOptionValue(option.value as Input[], 'enrollmentId')?.value;
348
+ const isAdditionalEnroll = isEnroll && authenticator
349
+ && isAuthenticatorAlreadyEnrolled(authenticator, authenticatorEnrollments);
311
350
  const AUTHENTICATORS_WITH_METHOD_TYPE = [
312
351
  AUTHENTICATOR_KEY.ON_PREM,
313
352
  AUTHENTICATOR_KEY.OV,
@@ -315,26 +354,25 @@ const formatAuthenticatorOptions = (
315
354
  ];
316
355
  const AUTHENTICATORS_WITH_NO_TRANSLATE_CLASS = [
317
356
  AUTHENTICATOR_KEY.PHONE,
318
- AUTHENTICATOR_KEY.CUSTOM_APP,
357
+ AUTHENTICATOR_KEY.EMAIL,
319
358
  ];
320
359
  const AUTHENTICATORS_WITH_LTR_DESCRIPTION = [
321
360
  AUTHENTICATOR_KEY.PHONE,
322
361
  ];
323
- const authenticator = option.relatesTo;
324
362
 
325
363
  return {
326
364
  type: 'AuthenticatorButton',
327
- label: option.label,
365
+ label: getAuthenticatorLabel(option, authenticatorKey),
328
366
  id: `auth_btn_${authenticatorKey}_${enrollmentId || id}`,
329
367
  noTranslate: !isEnroll && AUTHENTICATORS_WITH_NO_TRANSLATE_CLASS.includes(authenticatorKey),
330
368
  dir: !isEnroll && AUTHENTICATORS_WITH_LTR_DESCRIPTION.includes(authenticatorKey) ? 'ltr' : undefined,
331
369
  options: {
332
370
  type: ButtonType.BUTTON,
333
371
  key: authenticatorKey,
372
+ isEnroll,
373
+ isAdditionalEnroll,
334
374
  authenticator,
335
- ctaLabel: isEnroll
336
- ? loc('oie.enroll.authenticator.button.text', 'login')
337
- : loc('oie.verify.authenticator.button.text', 'login'),
375
+ ctaLabel: getCtaLabel(isEnroll, isAdditionalEnroll),
338
376
  description: getAuthenticatorDescription(
339
377
  option,
340
378
  authenticatorKey,
@@ -371,13 +409,18 @@ const getAuthenticatorButtonElements = (
371
409
  options: IdxOption[],
372
410
  step: string,
373
411
  isEnroll?: boolean,
412
+ authenticatorEnrollments?: IdxAuthenticator[],
374
413
  ): AuthenticatorButtonElement[] => {
375
- const formattedOptions = formatAuthenticatorOptions(options, step, isEnroll);
414
+ const formattedOptions = formatAuthenticatorOptions(
415
+ options, step, isEnroll, authenticatorEnrollments,
416
+ );
376
417
 
377
418
  // appending OV options back to its original spot
378
- const ovOptions = buildOktaVerifyOptions(options, step, isEnroll);
419
+ const ovOptions = buildOktaVerifyOptions(options, step, isEnroll, authenticatorEnrollments);
379
420
  if (ovOptions.length && options?.length) {
380
- const ovIndex = options.findIndex(({ relatesTo }) => relatesTo?.key === AUTHENTICATOR_KEY.OV);
421
+ const ovIndex = formattedOptions.findIndex((
422
+ { options: { authenticator } },
423
+ ) => authenticator?.key === AUTHENTICATOR_KEY.OV);
381
424
  formattedOptions.splice(ovIndex, 1, ...ovOptions);
382
425
  }
383
426
 
@@ -405,9 +448,8 @@ export const getAppAuthenticatorMethodButtonElements = (
405
448
 
406
449
  const authButtons = methodType.options.map((option, index) => ({
407
450
  type: 'AuthenticatorButton',
408
- label: option.label,
451
+ label: getAuthenticatorLabel(option, authKey),
409
452
  id: `auth_btn_${authKey}_${option.value as string}`,
410
- noTranslate: authKey === AUTHENTICATOR_KEY.CUSTOM_APP,
411
453
  options: {
412
454
  type: ButtonType.BUTTON,
413
455
  key: authKey,
@@ -458,8 +500,10 @@ export const getAuthenticatorVerifyButtonElements = (
458
500
  export const getAuthenticatorEnrollButtonElements = (
459
501
  authenticatorOptions: IdxOption[],
460
502
  step: string,
503
+ authenticatorEnrollments?: IdxAuthenticator[],
461
504
  ): AuthenticatorButtonElement[] => getAuthenticatorButtonElements(
462
505
  authenticatorOptions,
463
506
  step,
464
507
  true,
508
+ authenticatorEnrollments,
465
509
  );
@@ -14,7 +14,6 @@ import {
14
14
  AppIcon,
15
15
  DeviceIcon,
16
16
  LocationIcon,
17
- MobileDeviceIcon,
18
17
  } from '../../components/Images';
19
18
  import { CHALLENGE_INTENT_TO_I18KEY } from '../../constants';
20
19
  import {
@@ -89,12 +88,11 @@ export const transformEmailMagicLinkOTPOnly: TerminalKeyTransformer = (transacti
89
88
  const clientOs = client?.value?.os;
90
89
  const clientBrowser = client?.value?.browser;
91
90
  if (clientBrowser && clientOs) {
92
- const isMobileDevice = clientOs === 'Android' || clientOs === 'iOS';
93
91
  browserImageElement = {
94
92
  type: 'ImageWithText',
95
93
  options: {
96
94
  id: 'browser',
97
- SVGIcon: isMobileDevice ? MobileDeviceIcon : DeviceIcon,
95
+ SVGIcon: DeviceIcon,
98
96
  textContent: loc(
99
97
  'idx.return.link.otponly.browser.on.os',
100
98
  'login',
@@ -21,7 +21,6 @@ import { createIdentifierContainer } from './createIdentifierContainer';
21
21
  import { createTextElementKeys } from './createTextElementKeys';
22
22
  import { overwriteAutocomplete } from './overwriteAutocomplete';
23
23
  import { setFocusOnFirstElement } from './setFocusOnFirstElement';
24
- import { setLtrFields } from './setLtrFields';
25
24
  import { updateCustomFields } from './updateCustomFields';
26
25
  import { updateElementKeys } from './updateElementKeys';
27
26
  import { updatePasswordDescribedByValue } from './updatePasswordDescribedByValue';
@@ -36,7 +35,6 @@ export const transformUISchema: TransformStepFnWithOptions = (
36
35
  updateElementKeys(options),
37
36
  addIdToElements,
38
37
  updatePasswordDescribedByValue,
39
- setLtrFields,
40
38
  overwriteAutocomplete(options),
41
39
  // OKTA-586475: Please keep this as the last function to be executed since we want to ensure
42
40
  // that the identifier container is always positioned at the top of a view
@@ -41,6 +41,9 @@
41
41
  ],
42
42
  "util/*": [
43
43
  "../util/*"
44
+ ],
45
+ "@okta/odyssey-react-mui/icons": [
46
+ "../../node_modules/@okta/odyssey-react-mui/src/icons.generated"
44
47
  ]
45
48
  },
46
49
  "resolveJsonModule": true,
@@ -10,6 +10,13 @@
10
10
  * See the License for the specific language governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- import FieldLevelMessageContainer from './FieldLevelMessageContainer';
14
-
15
- export default FieldLevelMessageContainer;
13
+ export type ImageProps = {
14
+ src: string;
15
+ alt: string;
16
+ width?: string | number;
17
+ height?: string | number;
18
+ maxWidth?: string | number;
19
+ maxHeight?: string | number;
20
+ testId?: string;
21
+ ariaHidden?: boolean;
22
+ };
@@ -17,6 +17,7 @@ export * from './component';
17
17
  export * from './context';
18
18
  export * from './error';
19
19
  export * from './handlers';
20
+ export * from './image';
20
21
  export * from './ion';
21
22
  export * from './json';
22
23
  export * from './jsonforms';
@@ -310,7 +310,6 @@ export interface ButtonElement extends UISchemaElement {
310
310
  dataSe?: string;
311
311
  stepToRender?: string;
312
312
  ariaLabel?: string;
313
- classes?: string;
314
313
  disabled?: boolean;
315
314
  Icon?: FunctionComponent | string;
316
315
  iconAlt?: string;
@@ -325,6 +324,8 @@ export interface AuthenticatorButtonElement extends UISchemaElement {
325
324
  key: string;
326
325
  ariaLabel: string;
327
326
  authenticator?: IdxAuthenticator;
327
+ isEnroll?: boolean;
328
+ isAdditionalEnroll?: boolean;
328
329
  ctaLabel: string;
329
330
  description?: string;
330
331
  nickname?: string;
@@ -10,6 +10,7 @@
10
10
  * See the License for the specific language governing permissions and limitations under the License.
11
11
  */
12
12
 
13
+ import { DesignTokensOverride } from '@okta/odyssey-react-mui';
13
14
  import {
14
15
  FlowIdentifier,
15
16
  IdxActionParams,
@@ -34,7 +35,6 @@ import {
34
35
  UserOperation,
35
36
  } from '../../../types';
36
37
  import { InterstitialRedirectView } from '../constants';
37
- import { DesignTokensType } from '../util/designTokens';
38
38
  import { WidgetHooks } from '../util/widgetHooks';
39
39
  import { OktaSignInAPI } from './api';
40
40
  import { JsonObject } from './json';
@@ -119,7 +119,7 @@ export type WidgetOptions = {
119
119
  brandColors?: BrandColors;
120
120
 
121
121
  // theme
122
- theme?: { tokens: DesignTokensType }; // & ThemeOptions;
122
+ theme?: { tokens: DesignTokensOverride }; // & ThemeOptions;
123
123
 
124
124
  // hooks
125
125
  hooks?: HooksOptions; // object in options
@@ -285,7 +285,7 @@ interface ProxyIdxResponse {
285
285
 
286
286
  type CustomButton = {
287
287
  title: string;
288
- className: string;
288
+ className?: string;
289
289
  i18nKey: string;
290
290
  dataAttr?: string;
291
291
  click: { (): void }
@@ -0,0 +1,48 @@
1
+ /*
2
+ * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.
3
+ * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
4
+ *
5
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
6
+ * Unless required by applicable law or agreed to in writing, software
7
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9
+ *
10
+ * See the License for the specific language governing permissions and limitations under the License.
11
+ */
12
+
13
+ import { WidgetMessage } from '../types';
14
+
15
+ type FieldLevelErrorMessages = {
16
+ errorMessage?: string;
17
+ errorMessageList?: string[];
18
+ };
19
+
20
+ export const buildFieldLevelErrorMessages = (
21
+ errors: WidgetMessage[] | undefined,
22
+ ) : FieldLevelErrorMessages => {
23
+ const hasErrors = typeof errors !== 'undefined' && errors.length > 0;
24
+
25
+ if (hasErrors) {
26
+ if (errors.length === 1) {
27
+ const error = errors[0];
28
+ // Covers nested messages, e.g. password requirements not met
29
+ // The SIW does not have messages nested more than once
30
+ if (Array.isArray(error.message)) {
31
+ return {
32
+ errorMessage: error.description,
33
+ errorMessageList: error.message
34
+ .filter((msg) => typeof msg.message === 'string')
35
+ .map((msg) => msg.message as string),
36
+ };
37
+ }
38
+ return { errorMessage: error.message };
39
+ }
40
+ return {
41
+ errorMessageList: errors
42
+ .filter((error) => typeof error.message === 'string')
43
+ .map((error) => error.message as string),
44
+ };
45
+ }
46
+
47
+ return {};
48
+ };
@@ -14,7 +14,6 @@ import {
14
14
  IdxAuthenticator,
15
15
  IdxMessage, IdxRemediation, IdxTransaction, NextStep,
16
16
  } from '@okta/okta-auth-js';
17
- import classNames from 'classnames';
18
17
 
19
18
  import IDP from '../../../util/IDP';
20
19
  import Util from '../../../util/Util';
@@ -77,8 +76,7 @@ export const getCustomButtonElements = (widgetProps: WidgetProps): ButtonElement
77
76
  options: {
78
77
  type: ButtonType.BUTTON,
79
78
  step: '',
80
- dataSe: customButton.dataAttr,
81
- classes: classNames(customButton.className, 'default-custom-button'),
79
+ dataSe: customButton.dataAttr ?? 'custom-button',
82
80
  variant: 'secondary',
83
81
  onClick: customButton.click,
84
82
  },
@@ -105,8 +103,7 @@ const getPIVButtonElement = (
105
103
  options: {
106
104
  type: ButtonType.BUTTON,
107
105
  step: IDX_STEP.PIV_IDP,
108
- dataSe: 'piv-card-button',
109
- classes: `${piv?.className || ''} piv-button`,
106
+ dataSe: `piv-card-button${piv?.className ? ` ${piv.className}` : ''}`,
110
107
  variant: 'secondary',
111
108
  Icon: SmartCardIconSvg,
112
109
  iconAlt: loc('piv.card', 'login'),
@@ -189,10 +186,6 @@ const getConfigIdpButtonRemediations = (
189
186
  name: idpConfig.text,
190
187
  };
191
188
  const redirectUri = `${baseUrl}/sso/idps/${idpConfig.id}?stateToken=${stateHandle}`;
192
- if (idpConfig.className) {
193
- // @ts-expect-error OKTA-609464 - className missing from IdpConfig type
194
- idp.className = idpConfig.className;
195
- }
196
189
  return {
197
190
  name: IDX_STEP.REDIRECT_IDP,
198
191
  type: idpConfig.type,
@@ -249,17 +242,12 @@ export const getIdpButtonElements = (
249
242
  return {
250
243
  type: 'Button',
251
244
  label: displayName,
245
+ noTranslate: type === 'general-idp',
252
246
  options: {
253
247
  type: ButtonType.BUTTON,
254
248
  step: IDX_STEP.PIV_IDP,
255
- dataSe: 'piv-card-button',
256
- classes: classNames(
257
- 'social-auth-button',
258
- `social-auth-${type}-button`,
259
- // @ts-expect-error OKTA-609464 - className missing from IdpConfig type
260
- idpObject.idp?.className,
261
- { 'no-translate': type === 'general-idp' },
262
- ),
249
+ // @ts-expect-error OKTA-609464 - className missing from IdpConfig type
250
+ dataSe: `piv-card-button ${idpObject.idp?.className || `social-auth-${type}-button`}`,
263
251
  variant: 'secondary',
264
252
  Icon: idpIconMap[type],
265
253
  iconAlt: '',