react-native-auth0 icon indicating copy to clipboard operation
react-native-auth0 copied to clipboard

Support for new architecture and bridgeless

Open brentvatne opened this issue 1 year ago • 20 comments

Checklist

  • [X] I have looked into the Readme, Examples, and FAQ and have not found a suitable solution or answer.
  • [X] I have looked into the API documentation and have not found a suitable solution or answer.
  • [X] I have searched the issues and have not found a suitable solution or answer.
  • [X] I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • [X] I agree to the terms within the Auth0 Code of Conduct.

Describe the problem you'd like to have solved

Hi there! I'm working on supporting the roll out of the new architecture + bridgeless with Expo and Meta, and as part of that we identified which are the most popular native libraries on EAS Build to help prioritize which libraries to investigate. react-native-auth0 came up on that list. See the list on Google Sheets (request edit access if you'd like to update the status of react-native-auth0 after testing, or if you prefer to report back here on this issue it's fine too).

We want to start recommending folks try out the new architecture in the next release, react-native 0.74 / Expo SDK 51. Ideally we can get the ecosystem ready to switch over to the new architecture within the next few releases. So, we'll have from now until 0.74 release (before May) to give meta feedback on anything that might not be working as expected with the new arch/bridgeless enabled.

Folks at Meta would really appreciate it if you could test your libraries against the latest release and report any issues that you find. This new version enables an interop layer by default, so hopefully many things will just work, but the more off of the beaten path of a simple module / view that a library goes the more likely it is to encounter possible issues ;) The following gist includes a step by step process for how to test your library and report issues: https://gist.github.com/cipolleschi/82b7a9561b8861330efabbd3eb08c6f5.

Describe the ideal solution

react-native-auth0 works correctly with the new architecture enabled or disabled, and with bridgeless enabled or disabled, using React Native 0.74. More info in: https://gist.github.com/cipolleschi/82b7a9561b8861330efabbd3eb08c6f5.

Alternatives and current workarounds

No response

Additional context

No response

brentvatne avatar Mar 13 '24 20:03 brentvatne

Still experiencing #804, which was won't-fixed because New Arch was in beta. Believe New Arch will be the default in the React Native release after this one.

chriszs avatar Apr 12 '24 09:04 chriszs

@chriszs - that's the plan! for any maintainers here, please refer to https://github.com/reactwg/react-native-new-architecture/discussions/167 for more context

brentvatne avatar Apr 17 '24 01:04 brentvatne

@brentvatne If I grok that spreadsheet correctly, Auth0 is one of only 10 unique maintainers among the top 400 packages that hasn't started on new arch support?

@poovamraj Can we get this prioritized?

kibiz0r avatar Apr 18 '24 20:04 kibiz0r

As a test, I upgraded the example app to the latest 0.74 RC using the Test Your Library guide, enabled new arch (newArchEnabled=true) and then deleted the codegenConfig config key from package.json per the Interop Layer test instructions (since I didn't see TurboModule specs). That is, all I did was this:

  },
-  "codegenConfig": {
-    "name": "RNAuth0Spec",
-    "type": "modules",
-    "jsSrcsDir": "src"
-  },
  "husky": {

The example appears to work correctly on Android using 0.74 and new arch, though I haven't thoroughly tested it and it's possible I'm missing something.

This obviously isn't a full conversion to a TurboModule, it doesn't ensure compatibility with new arch on lower versions of React Native (unless the Interop Layer is explicitly enabled) and supposedly some day the Interop Layer will go away, but it does appear to work as a first step.

I wonder if a two-step approach would be to delete the codegen config, ensure the interop layer works, and then do a full conversion at a later date.

chriszs avatar Apr 19 '24 07:04 chriszs

@chriszs - I think that is a good approach! we're recommending releasing interop layer compat first, then migrating when you have time

brentvatne avatar Apr 23 '24 18:04 brentvatne

@desusai7 Can we please get this prioritized? This package has been our only blocker for new arch since January, and I've been trying to get some info on when/whether we can expect a first-party effort on it.

kibiz0r avatar May 23 '24 15:05 kibiz0r

I have the following in a patch-package patch:

diff --git a/node_modules/react-native-auth0/package.json b/node_modules/react-native-auth0/package.json
index 2b83dc3..500a8c6 100644
--- a/node_modules/react-native-auth0/package.json
+++ b/node_modules/react-native-auth0/package.json
@@ -201,11 +201,6 @@
       ]
     ]
   },
-  "codegenConfig": {
-    "name": "RNAuth0Spec",
-    "type": "modules",
-    "jsSrcsDir": "src"
-  },
   "husky": {
     "hooks": {
       "pre-commit": "pretty-quick --staged"

Which lets me circumvent the issue on my new arch branch enough to see that this sadly isn't the only blocker.

chriszs avatar May 23 '24 22:05 chriszs

Hi everyone,

Thank you for your patience. We apologize for any inconvenience caused. We are discussing this internally and will address it as part of version 4 of the SDK, which is already in progress.

We will keep you updated on our progress.

CC @brth31

desusai7 avatar Jun 06 '24 06:06 desusai7

hi there! I just wanted to update you to let you know we are tracking new arch compatibility status in the official react-native library directory now: https://reactnative.directory/

you can add/modify entries for your libraries in react-native-libraries.json via a pull request (more info in readme).

brentvatne avatar Jul 16 '24 21:07 brentvatne

Hey team @ Auth0.

Is there any way you could open up the v4 branch so other people could contribute towards getting this out faster? Bridgeless brings incredible benefits to the ecosystem and anyone relying on Auth0 is currently unable to leverage it. In our app, Auth0 is the last module we're waiting on, and I'm sure it must be the same for other codebases around the world.

Thank you!

rodperottoni avatar Jul 18 '24 22:07 rodperottoni

Hello team @ Auth0. It's been 2 months since the last update you gave us on Bridgeless support for Auth0. For a paid service, it feels wrong that we're still left in the dark when it comes to bridgeless support. Could you please give us an update?

rodperottoni avatar Aug 29 '24 01:08 rodperottoni

Hi @rodperottoni,

Thank you for your patience.

We are currently working on various improvements, including bridgeless support, as part of v4 of the Android SDK. This is planned, and we are actively focusing on it. We would love to see contributions from the community, as this would help us release bridgeless feature faster for everyone.

Your contributions via OSS would be greatly appreciated and would make a significant impact.

Thank you for your support!

desusai7 avatar Aug 29 '24 07:08 desusai7

Is there a branch you’re currently working on for v4, or can contributions be targeted at main?

On Thu, 29 Aug 2024 at 5:39 pm, Desu Sai Venkat @.***> wrote:

Hi @rodperottoni https://github.com/rodperottoni,

Thank you for your patience.

We are currently working on various improvements, including bridgeless support, as part of v4 of the Android SDK. This is planned, and we are actively focusing on it. We would love to see contributions from the community, as this would help us release bridgeless feature faster for everyone.

Your contributions via OSS would be greatly appreciated and would make a significant impact.

Thank you for your support!

— Reply to this email directly, view it on GitHub https://github.com/auth0/react-native-auth0/issues/879#issuecomment-2316918850, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADUDESZD4KQDNHST7RZQCCLZT3FZLAVCNFSM6AAAAABEU4RSY6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJWHEYTQOBVGA . You are receiving this because you were mentioned.Message ID: @.***>

rodperottoni avatar Aug 29 '24 07:08 rodperottoni

Hi @brentvatne,

You can target to this branch here

desusai7 avatar Sep 06 '24 04:09 desusai7

@desusai7 React Native 0.76 will ship with new architecture enabled by default. Could you share an ETA of the v4 release with the community? Thank you!

https://github.com/facebook/react-native/releases/tag/v0.76.0-rc.0

blumk avatar Sep 11 '24 04:09 blumk

Hi @rodperottoni,

Thank you for your patience.

We are currently working on various improvements, including bridgeless support, as part of v4 of the Android SDK. This is planned, and we are actively focusing on it. We would love to see contributions from the community, as this would help us release bridgeless feature faster for everyone.

Your contributions via OSS would be greatly appreciated and would make a significant impact.

Thank you for your support!

This has been an issue that has been brought up by the community multiple times over the past year; Well before 0.74 was released. Asking for volunteer support to help provide an implementation/fix, without an ETA, coming up to a major release that will completely break functionality for a paid live service is really concerning as someone who relies on the service to a support a growing user base. Any updates would be appreciated.

error-try-again avatar Sep 11 '24 09:09 error-try-again

@desusai7 any updates? The branch you tagged above has no activity whatsoever - is Auth0 simply expecting the community to really jump in and update their paid product?

rodperottoni avatar Sep 26 '24 05:09 rodperottoni

Apologies for the radio silence! I'd like to share an update on this request:

Based on our analysis, porting to the new architecture is a fairly complex task. There are too many moving parts within the SDK and potential security issues to be taken into consideration. As a result, we need to spend more time to fully understand the differences between the interop and full conversion approaches. We will most likely have to weigh the pros and cons of both these approaches before deciding next steps here. We will be able to share more details by the end of November. Thank you for your patience!

brth31 avatar Oct 24 '24 08:10 brth31

@brth31, just for your information, the newly released version of React Native, 0.76.0, has the new architecture enabled by default. You can find more details here: https://github.com/facebook/react-native/releases/tag/v0.76.0”

bednar avatar Oct 24 '24 09:10 bednar

The recommendation from the React Native project is to the use interop approach first.

chriszs avatar Oct 24 '24 10:10 chriszs

@brth31 @desusai7 any plans on supporting the New Architecture and v0.76? I'm checking https://reactnative.directory and there is showing that the react-native-auth0 is not supporting the New Architecture. Would be good to have some updates from auth0 team to see if something is planned to happen soon or if we do have a workaround to enable us to update to the v0.76.

It's very frustrating that because of this library some customers cannot experience the benefits of the New Architecture.

eduardo-santos-tribia avatar Oct 30 '24 16:10 eduardo-santos-tribia

@eduardo-santos-tribia im same page with you and to use new architecture I gave up on react-native-auth0 and implemented my own authentication using Expo Auth Session. I’m still using Auth0, but I handle it manually by calling the authorize, logout, and oauth/token endpoints myself. I think the update to New Architecture for the react-native-auth0 package will take a while, based on the message from the Auth0 team.

luizpcam avatar Oct 30 '24 17:10 luizpcam

@eduardo-santos-tribia @luizpcam apologies for the delay. We are currently exploring options. I will be able to share updates by the end of this month. Thanks for your patience!

brth31 avatar Nov 05 '24 05:11 brth31

Our team got stuck on this. Looking forward to updates!

evanliveo avatar Nov 07 '24 19:11 evanliveo

Update: We will tentatively begin working on this by the first week of December. I will be able to share release timelines by mid December. Thanks for your patience, everyone!

brth31 avatar Nov 15 '24 04:11 brth31

@brth31 thanks for awesome news!

bednar avatar Nov 15 '24 05:11 bednar

@brth31 awesome ! 👍

luizpcam avatar Nov 16 '24 12:11 luizpcam

Great news, thank you!

evanliveo avatar Nov 18 '24 12:11 evanliveo

Great news!

JustynRoseRocket avatar Dec 05 '24 15:12 JustynRoseRocket

Update: We are tentatively planning to support the Interop layer by the end of Jan.

We are also planning to release a fast follow with full Turbo Native Module support. I'll be able to share timelines on this by mid Jan. Thanks for your patience!

brth31 avatar Dec 13 '24 08:12 brth31