Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webauthn helper methods not properly exported with types #1543

Open
Burnett2k opened this issue Oct 7, 2024 · 0 comments
Open

webauthn helper methods not properly exported with types #1543

Burnett2k opened this issue Oct 7, 2024 · 0 comments
Labels

Comments

@Burnett2k
Copy link

Describe the bug

Okta references these helper methods in multiple locations, but they are not properly typed and exported so they cannot be used without using //@ts-ignore or some other means to get past the build error.
The method is documented in the source code sample apps and In okta's documentation on webauthn.

These methods can be used by adding a ts-ignore, but that is risky and makes me want to re-write them instead. Is it possible to get typings for the methods in the webauthn file?

There is some mention about types not working for typescript < 3.6 in the readme, but that is not the case in my repository. We're on TS 4.0 version.

Error message from compiler.

error TS2339: Property 'webauthn' does not exist on type 'typeof OktaAuth'.

Reproduction Steps?

Create a typescript application
Install '@okta/okta-auth-js'
Try and call any static methods off of OktaAuth such as OktaAuth.webauthn.buildCredentialCreationOptions()

SDK Versions

System:
OS: macOS 14.6.1
CPU: (8) arm64 Apple M1 Pro
Memory: 405.50 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.22 - ~/.nvm/versions/node/v18.19.0/bin/yarn
npm: 10.2.3 - ~/.nvm/versions/node/v18.19.0/bin/npm
pnpm: 8.6.7 - ~/.yarn/bin/pnpm
Browsers:
Chrome: 129.0.6668.90
Safari: 17.6

Additional Information?

I've tried accessing these methods in many different ways, but none of them seem to work other than adding ts-ignore and just hoping the static method continues to exist as a method on the OktaAuth class.

@Burnett2k Burnett2k added the bug label Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant