-
Notifications
You must be signed in to change notification settings - Fork 213
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
Add Expo config plugin (SDK 41+) #424
Conversation
78b3876
to
8cb5f55
Compare
This is much appreciated. |
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.
A few minor changes, but otherwise this is really great work!
@sdacunha thanks for creating this but I just wanted to check something with you since I'm having issues with my EAS build. cli version : 43.0.0 this is my app.json
I even tried using the EAS environment build but no luck. eas.json
|
@EvanBacon thanks for reviewing this! Some good suggestions there, will get to this soon. |
@lbalmaceda @Widcket This has been open awhile, any chance there's bandwidth for support? |
Are there any news on this? |
Would also love for Auth0 to have better managed Expo workflow support. |
As an aside, However, this package should still pursue adding an Expo Config Plugin because it gives users more options! |
I second this - we are currently using AuthSession for auth0 at this time (hence I haven't been able to prioritize work on this, but hopefully will get to this soon) and will continue to do so in the near-term since it serves our purposes right now. Likely going to be considering using this library for more control over the auth process and other auth0 specific offerings. |
Hi, Apologies for the delay. We will take a look into this PR, have a discussion with the team and get back to you on this. |
Are there any updates on this? 🙏 |
Appreciate all the work being done on this pull request. Looking forward to its release! |
Hello! An update on this PR would be great, and any help needed to expedite this. |
Thank you for making progress on this branch @poovamraj |
Hey All 👋 Sorry about the long wait but we are working on the long-awaited Expo support 🚀 We would love to hear your feedback on this PR as we are almost done with the work. I want to give a huge shoutout to @sdacunha who has done tremendous work with this PR and @EvanBacon for reviewing this. |
Thanks @poovamraj. Excited to see this solution. My big hope here is getting out of edge cases when using
|
Hello everyone, thank you to @sdacunha for coming up with this, super super helpful in our app! |
Hey @stevenconner This change will mean you sadly will not be able to use it off the repo directly. From a quick glance of the changes so far, it seems like it will get built on publish. The approach of leaving the build folder in and not ignoring it was seen in a few repos I worked with so I had initially done that, but I believe some of them had not published a version to npm yet and it may have been a stop gap (such as rnmapbox). @poovamraj we should likely confirm however that it does not get ignored from the final published package as including it in the .gitignore may do that, and end users will get the above error I currently have a published version of my fork at @sdacunha/react-native-auth0 (via GitHub's NPM registry) that I am using for the time being for our projects internally. It works for us in our EAS builds. Once this is merged / published I will likely switch over to keep up with updates and some of the nicer API changes to the plugin. Until then you can feel free to use that if it will unblock you, or you can build the plugin locally and publish to a registry for your use Thanks for following up on this @poovamraj - looking forward to seeing this merged in! |
@sdacunha thank you so much for this, pointing to your fork now, got me unblocked!! 🙏 |
Hey @onedanshow, I just tested out the scenario you told and it seems to work for me. What do you think? device-2022-08-24-203731.webm |
Looks like running |
Sounds good - however, I think the build folder will be excluded from the final uploaded package since its now being excluded in .gitignore and there is no separate .npmignore here. Thats why most projects do not .gitignore the plugin build folder, since the package that gets uploaded will not include plugin/build with the current setup from my understanding. |
Hey all 👋 just wanted to give an update that the First Availability with Expo support is now available here |
Changes
Please describe both what is changing and why this is important. Include:
N/A - none added or changed
N/A - No API level changes
N/A - No UI changes
While Expo supports Auth0 via AuthSession, this allows for native UIs to be built in Expo around this library while staying in the managed workflow (no custom native code!).
This change adds the support for using this library with the Expo Managed Workflow via a config plugin. This means the modifications to the Info.plist, build.gradle and AppDelegate.m are automatically performed by the plugin and allows users to generate a custom Expo dev client.
Work on this config plugin is based on @EvanBacon's config plugin work on expo-camera and react-native-mapbox-gl.
We use this internally via a forked version of this repo and our app seems to build in EAS and prebuilding locally gives correct results. I was able to call:
successfully in my SDK43 client built via EAS Build.
This change should have no effect on non-Expo users, nor Expo users who do not use the plugin via their app.json.
NOTE: Readme modifications are already made, but can be put off until this is released. I left these in for context
References
Please include relevant links supporting this change such as a:
See: https://expo.canny.io/feature-requests/p/support-auth0
See: #222
Please note any links that are not publicly accessible.
Testing
Please describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this library has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.
Tests for
Tests were added for custom merge logic (regex-based modifications similar to those made in react-native-mapbox-gl) in the plugin. A built version of the plugin was provided so upon publish, the plugin is available in a JS format that works with Expo 41+.
Much of the work and tests are based on existing Expo Custom plugins for other libraries written by the Expo team.
Additionally, one can create a new Expo SDK 41+ app, follow the README instructions and run expo prebuild to see changes added by this plugin to the native code (based on various config scenarios as described in the README.md)
Code coverage is failing, but unfortunately I'm not sure of a way to test the Expo plugin hooks. None of the other plugins I have come across run tests on those, and those seem to be the reason the coverage is failing.
Checklist
@EvanBacon would be great if you could review this as well!