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

Examples show a DOMString passed to challenge, but it's a BufferSource #341

Closed
jyasskin opened this issue Feb 14, 2017 · 1 comment
Closed

Comments

@jyasskin
Copy link
Member

https://w3c.github.io/webauthn/#sample-registration shows:

var challenge = "Y2xpbWIgYSBtb3VudGFpbg";
var options = { timeoutSeconds: 300,  // 5 minutes
                excludeList: [],      // No excludeList
                extensions: {"webauthn.location": true}  // Include location information
                                               // in attestation
};

// Note: The following call will cause the authenticator to display UI.
webauthnAPI.makeCredential(userAccountInformation, cryptoParams, challenge, options)

But the third parameter to makeCredential() is a BufferSource, which has to be one of the ArrayBuffer-related types. Which did you intend?

I think it'd be possible to use (DOMString or BufferSource), and say that a DOMString is base64-decoded before it's used.

@vijaybh
Copy link
Contributor

vijaybh commented Feb 14, 2017

It was intended to be an ArrayBuffer, looks like we forgot to update the sample. It could be any ArrayBuffer related type, I don't think we care which one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants