Unable to import createExtended() and getExtended() methods from webauthn-json/extended
santiagorodriguez96 opened this issue ยท 7 comments
Hi there! Thank you for your work on this!
I'm trying to use the createExtended()
and getExtended()
methods, but I'm unable to import them using import { createExtended, getExtended } from '@github/webauthn-json/extended'
.
I'm using version 0.4.1
of this package.
The error I'm getting is:
According to the documentation importing from @github/webauthn-json/extended
should work but it seems that this file does not exist in node_modules
after installing the last version.
Ah, good catch โ the build files are actually in @github/webauthn-json/dist/extended
.
Thanks for the report!
Woah, it looks like v0.4.1
was never actually published to registry.npmjs.org
.
We dual-publish packages to both to registry.npmjs.org
and npm.pkg.github.com
(https://github.com/github/webauthn-json/packages/18707/versions) but it seems something is going wrong and the registry.npmjs.org
publication fails. I've done a local on-off hack to do a public v0.4.2
release to registry.npmjs.org
for now, which seems to have the files: https://unpkg.com/browse/@github/webauthn-json@0.4.2/dist/
Out of curiosity, which extensions are you looking to use? This is the first I've heard of anyone trying to use them, so it's good to know that there's actually some interest in that build.
Great! It worked! Now I'm able to import the extension using version 0.4.2
and import { getExtended } from "@github/webauthn-json/dist/extended.esm"
โ the other option specified in the documentation was raising: TypeError: "Object(...) is not a function"
when calling getExtended
. To give a little more context, I'm calling getExtended
like:
getExtended({ "publicKey": credentialOptions }).then(function(credential) { ... }).catch(function(error) { ... });
with credentialOptions
being:
Out of curiosity, which extensions are you looking to use? This is the first I've heard of anyone trying to use them, so it's good to know that there's actually some interest in that build.
Currently, I'm trying to implement a new feature in the webauthn-ruby gem for providing the extension outputs so my intention was to test this feature in the webauthn rails demo app. Currently I was using txAuthSimple
.
Anyway, now I'm able to successfully authenticate using getExtended
and passing the extension txAuthSimple: "Could you please verify yourself?"
but it looks like the extension is being ignored given that nothing is being returned in ClientExtensionResults
and also nothing is being displayed by the authenticator โ which, if I understood correctly, should happen according to the documentation ๐
Is there something that I should be doing different?
I think it's because no browser implemented these extensions, a lot were removed from the spec: w3c/webauthn#1386
Oh I see! That makes sense!