-
Notifications
You must be signed in to change notification settings - Fork 441
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
feat: Add a config plugin for Expo (iOS & Android) #915
base: main
Are you sure you want to change the base?
feat: Add a config plugin for Expo (iOS & Android) #915
Conversation
e7bdbed
to
f04fe97
Compare
Hello, Thanks for making this plugin. My team is planning on using it. Do you have any information on whether this will be merged into the repo at some point? |
Hey @merijnhofsteenge and @aurelien-iapp -- just trying to get a sense of your use case here? Why would you be wanting to use this library as opposed to Expo's AuthSession library if you're already using Expo? |
Hey @zibs. My company also has native apps connecting to the same OAuth client. The native developers recommended using AppAuth. It seems however that Expo's AuthSession can do the same, so we will explore this route now. Thank you for your question! |
Hi, @zibs – I'm curious about the status of this PR. Will it be merged at some point? If so, I'd love to use the capability. Regarding your question about the use case, we have an existing app that uses react-native-app-auth, mostly with the Google provider, but we've experimented with others, particularly Strava. The functionality works great. The app has been in production for 3 years now. Originally, our app didn't use Expo but we've recently tried to add it, including the use of Continuous Native Generation (CNG), where the Until I found this PR, we were considering developing our own plug-in but I'm pleased to see that someone already did the work. Many thanks to the library maintainers for such a great package. @zibs, let me know your thoughts on the merge. |
@aurelien-iapp @Off2Race |
Hey guys, @Off2Race I used this plugin to setup a custom OAUTH sign-in for a client project about a year ago, and didn't have much feedback at the time so I deduced it was not a priority for the team. About your remarks:
Tell me if you are still interested and I will prepare the patch for Android. Regards ! |
@aurelien-iapp Appreciate the contribution, we would love to see the android code as well. We had some maintainers leave and our native libraries were harder to maintain without community support, but we have been able to dedicate some more resources to this one recently. |
@aurelien-iapp Thanks for the update, we will merge this and restructure the code so we can publish it on NPM. Could you fix the merge conflicts on your side? I would really like to keep your username as the original contributor on the commits so your work is captured here. |
Hello guys 👋 |
This patch adds an Expo config-plugin to easily embed the library into an Expo project. This plugin with insert the code changes described in the README each time the "prebuild" phase in run.
f04fe97
to
94d6a2c
Compare
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
1810769
to
7cf78af
Compare
I did rebase de branch, move the plugin dir into For iOS:
which makes the complete setup for RN>=0.68 as per the docs on Android:
IMPORTANT NOTES:
|
Fixes N/A
Description
This patch adds a new
plugin
directory with an Expo config plugin.This plugin will automatically patch the iOS Objective-C code to perform the different steps described in the README:
RNAppAuthAuthorizationFlowManager
to theAppDelegate
authorizationFlowManagerDelegate
propertyapplication:openURL:options:
to handle the custom-scheme based redirectsapplication:continueUserActivity:restorationHandler:
to handle the deep (universal) link redirectsAppDelegate.h
it leverageswithDangerousMod
and the "codeMod" API, which are not stable (but everybody uses them and we don't really have a choice here...)Steps to verify
react-native-app-auth
to the project: you can point to my branch for testing purposes:app.json
's"plugins"
section:npx expo prebuild
and check the contents ofAppDelegate.mm
andAppDelegate.h
. Changes will be visible as follows: