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
When integrating react-native-quick-base64, specifically importing and setting atob and btoa as global, there appears to be a conflict with @clerk/clerk-expo which relies on the default base64 encoding utilities. This issue arises because the global injection of atob and btoa overrides the expected behavior in other libraries which also depend on these utilities.
Steps to Reproduce
Install react-native-quick-base64 and configure it as follows:
The libraries should operate without interference in their handling of base64 encoding.
Actual Behavior
The global setting of atob and btoa interferes with @clerk/clerk-expo and potentially other libraries, leading to unexpected behaviors or failures in operations that rely on base64 encoding.
Suggested Solution
It would be beneficial for compatibility if we do not globally inject atob and btoa by default. Instead, allow developers to opt-in to this behavior in their own base code. This approach would prevent the override of native utilities unless explicitly desired by the developer, thereby reducing the risk of conflicts with other packages.
The text was updated successfully, but these errors were encountered:
I'm wondering if we could simply rely on the newly added atob and btoa functions in Hermes and RN 0.74.1 and avoid react-native-quick-base64 entirely. That would be much simpler.
Are you using Hermes and potentially able to verify that this works correctly with Clerk?
So plan is to remove that injection, and return a helpful error if the app is running in an environment without native atob such as JavascriptCore or old Hermes.
Description
When integrating
react-native-quick-base64
, specifically importing and settingatob
andbtoa
as global, there appears to be a conflict with@clerk/clerk-expo
which relies on the default base64 encoding utilities. This issue arises because the global injection ofatob
andbtoa
overrides the expected behavior in other libraries which also depend on these utilities.Steps to Reproduce
react-native-quick-base64
and configure it as follows:Error:
Expected Behavior
The libraries should operate without interference in their handling of base64 encoding.
Actual Behavior
The global setting of atob and btoa interferes with @clerk/clerk-expo and potentially other libraries, leading to unexpected behaviors or failures in operations that rely on base64 encoding.
Suggested Solution
It would be beneficial for compatibility if we do not globally inject atob and btoa by default. Instead, allow developers to opt-in to this behavior in their own base code. This approach would prevent the override of native utilities unless explicitly desired by the developer, thereby reducing the risk of conflicts with other packages.
The text was updated successfully, but these errors were encountered: