webauthn-json icon indicating copy to clipboard operation
webauthn-json copied to clipboard

Compilation error while using get

Open bharath154 opened this issue 11 months ago • 2 comments

Hello,

I am running into this compilation error, while trying to use navigate.credentials.get. Is this an issue or I am missing something?

 tsc --noEmit
node_modules/@github/webauthn-json/src/webauthn-json/base64url.ts:28:26 - error TS2569: Type 'Uint8Array' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators.

28   for (const charCode of byteView) {
                            ~~~~~~~~


Found 1 error.

tsc --version
Version 4.5.5

I am using it as below in my ts project:

      const options = parseRequestOptionsFromJSON({
        publicKey: {
          challenge: securityKeyChallengeResponse.challenge,
          timeout: 60000,
          rpId: securityKeyChallengeResponse.rp.id,
          allowCredentials: securityKeyChallengeResponse.allowedCredentials,
        },
      });

      const securityKeyCredential = await get(options);
      const securityKeyCredentialJson = securityKeyCredential.toJSON();

bharath154 avatar Mar 18 '24 19:03 bharath154