Discussion in #398 about adding some kind of support for the largeBlob extension left me with the impression that it's difficult to imagine largeBlob support getting generalized into some simple API here in the library due to its flexibility. However, the thought occurred to me that it could make things easier for RP's to work with such an extension if I exported browser's Base64URL <> ArrayBuffer helper methods for use in the browser.
The thinking goes, largeBlob's write takes an ArrayBuffer during registration that needs to be encoded in some manner to survive JSON transit from server to browser. And during authentication the value of blob is the same ArrayBuffer that has to be sent back to the server. Base64URL is already the common encoding between browser and server, and server already exposes such helpers, so why not do the same for browser?
Describe the issue
Discussion in #398 about adding some kind of support for the
largeBlob
extension left me with the impression that it's difficult to imaginelargeBlob
support getting generalized into some simple API here in the library due to its flexibility. However, the thought occurred to me that it could make things easier for RP's to work with such an extension if I exported browser'sBase64URL
<>ArrayBuffer
helper methods for use in the browser.The thinking goes,
largeBlob
'swrite
takes anArrayBuffer
during registration that needs to be encoded in some manner to survive JSON transit from server to browser. And during authentication the value ofblob
is the sameArrayBuffer
that has to be sent back to the server. Base64URL is already the common encoding between browser and server, and server already exposes such helpers, so why not do the same for browser?Reproduction Steps
N/A
Expected behavior
N/A
Code Samples + WebAuthn Options and Responses
N/A
Dependencies
N/A
SimpleWebAuthn Libraries
N/A
Additional context
N/A