You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the parseSchema API described in the docs, is not supported by the WidgetOptions type, provided by @okta/okta-signin-widget. The error says property 'push' does not exist on type 'RegistrationSchema':
Despite the error, this option appears to still be supported by the widget. Here's the output from the console.log(schema) above (showing an array that supports push):
Possible cause:
It looks like these imported types are being sourced from /src/types/index.ts, whereas Okta's internal tests for this functionality (like src/v3/src/transformer/transaction/transform.test.ts), are importing types from src/v3/src/types/index.ts.
@bryanbraun 👋 Thank you so much for this, I have created an internal ref to fix this type.
Internal ref: OKTA-720583
FYI, you may already know this, but if this error is blocking you you can use @ts-ignore until we deploy the type fix. As you can see it is in fact an array and you can safely use array operations on the property.
Describe the bug
Using the parseSchema API described in the docs, is not supported by the
WidgetOptions
type, provided by@okta/okta-signin-widget
. The error saysproperty 'push' does not exist on type 'RegistrationSchema'
:Despite the error, this option appears to still be supported by the widget. Here's the output from the
console.log(schema)
above (showing an array that supportspush
):Possible cause:
It looks like these imported types are being sourced from
/src/types/index.ts
, whereas Okta's internal tests for this functionality (likesrc/v3/src/transformer/transaction/transform.test.ts
), are importing types fromsrc/v3/src/types/index.ts
.Reproduction Steps
Codesandbox example showing the type error: https://codesandbox.io/p/sandbox/okta-signin-widget-types-nk7q3r?file=%2Fsrc%2Foptions.ts%3A15%2C25
(this example shows the type error but isn't set up to log the schema value itself)
SDK Versions
System:
OS: macOS 14.1.1
CPU: (8) arm64 Apple M1 Pro
Memory: 78.94 MB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.19.0 - ~/.nvm/versions/node/v18.19.0/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v16.14.0/bin/yarn
npm: 10.2.3 - ~/.nvm/versions/node/v18.19.0/bin/npm
pnpm: 8.6.0 - ~/.nvm/versions/node/v16.14.0/bin/pnpm
Browsers:
Chrome: 123.0.6312.124
Chrome Canary: 125.0.6422.0
Firefox Nightly: 126.0a1
Safari: 17.1
npmPackages:
@okta/okta-signin-widget: ^7.15.1 => 7.15.1
Additional Information
This issue may be connected to #2726, which is reporting other missing types.
The text was updated successfully, but these errors were encountered: