dropbox-sdk-js icon indicating copy to clipboard operation
dropbox-sdk-js copied to clipboard

web version of the sdk should use the browser crypto api

Open ta32 opened this issue 1 year ago • 1 comments

Why is this feature valuable to you? Does it solve a problem you're having? The web version of the JavaScript SDK is importing the NodeJs (server) crypto module - the web-pack fallback for this is https://github.com/browserify/crypto-browserify

This results in a large bundle size for your web-app. It should be possible to replace this with the native browser crypto API's https://developer.mozilla.org/en-US/docs/Web/API/Crypto

Also I am not sure if its safe to continue using this fallback for the future especially for something like cryptography.

Describe the solution you'd like The SDK should detect its being used in the browser and use the https://developer.mozilla.org/en-US/docs/Web/API/Crypto API.

Describe alternatives you've considered None

Additional context related issues https://github.com/dropbox/dropbox-sdk-js/issues/991 https://github.com/dropbox/dropbox-sdk-js/issues/614

ta32 avatar May 31 '23 13:05 ta32

Thanks for writing this up! I'll ask the team to update this accordingly, though I can't promise if/when this would be done.

greg-db avatar May 31 '23 15:05 greg-db