-
Notifications
You must be signed in to change notification settings - Fork 56
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
[ECO-4737, ECO-4756] Fix auth token encoding in React Native #1750
Conversation
921a176
to
5d25531
Compare
5d25531
to
b747d9d
Compare
b747d9d
to
21d04f5
Compare
21d04f5
to
7745d0f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Continuing our conversation on Slack where I asked why you'd switched web’s output type from You said that going back and forth between In terms of what's the more "correct" type to use, you said that using Just some thoughts, will leave it to you to decide what to do 🙂 |
Agree, I thought about this yesterday after your comments and started leaning towards this approach as well. I'll go ahead and change it so we always convert to |
Also removes comment about old browsers support as it's not needed after #1633
7745d0f
to
bebe0cd
Compare
@lawrence-forooghian Updated PR to always convert to ArrayBuffer using dedicated method in a20f20b |
Resolves #1730 , resolves #1749
Fixes incorrect usage of the underlying ArrayBuffer buffer in web BufferUtils, where we didn't account for the
byteOffset
andbyteLength
of the original array buffer view. This resulted in us incorrectly encoding auth tokens in the React Native bundle, where we use a polyfill for the TextEncoder class, which returned Uint8Array as a subarray of the underlying ArrayBuffer (see polyfill's code).