You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One possible foot gun in the structure of the Digital Credentials API is that instances of DigitalCredentialsProvider (soon DigitalCredentialsRequest) maybe require certain values to be specified as Uint8Array values. Is there anything that can be defined at the navigator.credentials.get({ digital: ... }) level here to help developers treat Uint8Array values exclusively as (Base64url) strings into and out of this .get() call?
My motivation here is to reduce the need to write/pull in a base64url-to-bytes helper when using this API for lack of standard functionality in JavaScript to pull this off. JSON serialization of Uint8Array is awkward. Improvements to Uint8Array to add things like toBase64() and fromBase64() are in Stage 3 and so likely to become available to devs over bespoke helpers, but even when those are available it'd be great to handle most of the back-and-forth automatically if possible for easing adoption.
The text was updated successfully, but these errors were encountered:
I wonder if this has inadvertently become a dupe of #125 🤔
Edit: Then again I wonder if serialization methods would be necessary if this API could mandate that user agents handle such values automatically (so from the developer's perspective it's base64url strings in and out)
One possible foot gun in the structure of the Digital Credentials API is that instances of
DigitalCredentialsProvider
(soonDigitalCredentialsRequest
) maybe require certain values to be specified as Uint8Array values. Is there anything that can be defined at thenavigator.credentials.get({ digital: ... })
level here to help developers treatUint8Array
values exclusively as (Base64url) strings into and out of this.get()
call?My motivation here is to reduce the need to write/pull in a base64url-to-bytes helper when using this API for lack of standard functionality in JavaScript to pull this off. JSON serialization of
Uint8Array
is awkward. Improvements toUint8Array
to add things liketoBase64()
andfromBase64()
are in Stage 3 and so likely to become available to devs over bespoke helpers, but even when those are available it'd be great to handle most of the back-and-forth automatically if possible for easing adoption.The text was updated successfully, but these errors were encountered: