-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[PAID] [$250] Disable NFC on onfido
react-native-sdk
#48950
Comments
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allgandalf ( |
Triggered auto assignment to @strepanier03 ( |
Edited by proposal-police: This proposal was edited at 2024-09-12 10:28:35 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.This section has already been noted in the BUG description
What is the root cause of that problem?We don't turn off NFC when initializing the connection to Onfido What changes do you think we should make in order to solve the problem?Currently, we're using "@onfido/react-native-sdk": "10.6.0", which allows us to pass disableNFC: true to disable NFC. However, in the latest release (v13.0.0) available at https://github.com/onfido/react-native-sdk/releases/tag/v13.0.0, the disableNFC parameter has been deprecated, and a new parameter called nfcOption has been introduced. Therefore, we have two options:
The OnfidoSDK.start function in the react-native-sdk relies on the native start function to initialize the connection. You can review the implementation here: Onfido.ts Line 93. So we need to clean up any unused libraries or packages in the native code after NFC is disabled.
What alternative solutions did you explore? (Optional) |
@cretadn22 can you be more specific here please, which |
@allgandalf Let's see this document: https://github.com/onfido/react-native-sdk?tab=readme-ov-file#disabling-nfc-and-excluding-dependencies We need to apply the change from document to here
To modify the @onfido/react-native-sdk, you can either use patch-package or fork the library. |
Lets go with @cretadn22 proposal here, 🎀👀🎀 C+ reviewed |
Triggered auto assignment to @rafecolton, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@cretadn22 can you please clarify a couple things about your proposal:
|
2a. I don’t see any alternative; we can only remove it from the react-native-sdk repository. 2b. This step is optional. There’s no issue if we choose to leave it as is. |
1 sounds good 👍 @AndrewGable what do you think about doing a patch to exclude the nfc dependencies on android? It's not necessary to solve the problem in the OP but I assume it will make the android build a little smaller and/or faster. Seems overkill to me to maintain a fork for this, since the change would never get merged. |
Why do we need to patch? I assumed these changes were made to our own |
Great question! I don't know much about grade builds. I tried searching the App code for "com.onfido.sdk.capture" and the only instance I found was in So I think that means we can add that block to our own build file as you're suggesting, but I'm not sure. If that sounds right to you, would it get added to |
Yes I would assume it would be changed in |
@AndrewGable, I don't think we can proceed with that approach. We need to make this change in the onfido/react-native-sdk library. @rafecolton, we already have the |
Why not? |
@AndrewGable, hold on for a moment. I’ll give it another try and get back to you |
Not overdue Melvin, we are discussing |
@AndrewGable @rafecolton After checking, I see that we don't need to exclude any dependencies since we haven't imported them yet. You can confirm this by looking in android/app/build.gradle We only need exclude these dependencies if they are imported in android/app/build.gradle, similar to the sampleApp referenced in the library. |
Nice, even better! So we can skip that part of the proposal entirely. @cretadn22 assigning you to implement the |
Not sure why the upwork automation isn't working 🤔 |
onfido
react-native-sdk
onfido
react-native-sdk
Job added to Upwork: https://www.upwork.com/jobs/~021836544665597870593 |
Current assignee @allgandalf is eligible for the External assigner, not assigning anyone new. |
📣 @allgandalf 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @cretadn22 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@AndrewGable We're using "@onfido/react-native-sdk": "10.6.0," and we need to refer to the correct documentation for that version, as it differs from the current one. Please visit https://github.com/onfido/react-native-sdk/releases/tag/v10.6.0 to download the zip file. Then, check the README file for the appropriate documentation version. |
Sorry everyone, I should have investigated more carefully to provide this information earlier in my proposal to avoid any confusion. |
Ah nice find @cretadn22! 👍 |
PR approved from my side ♻️ , waiting on @rafecolton for their review 🙇 |
@strepanier03, making you issue owner now since the PR is merged |
This should be ready for payment on 4th |
Working on this now that I'm back from OoO and more caught up. |
onfido
react-native-sdk
onfido
react-native-sdk
onfido
react-native-sdk
onfido
react-native-sdk
Okay, all contracts paid and closed. Thanks everyone! |
Problem
The Apple developer team who reviews our iOS application commonly rejects our New Expensify app because they ask for a video of how the New Expensify app uses NFC. We know that this NFC support comes from the
onfido
react-native-sdk
per their documentation. However, we do not currently use the passport NFC scanning.Solution
Remove the NFC support as described here: https://github.com/onfido/react-native-sdk?tab=readme-ov-file#disabling-nfc-and-excluding-dependencies
Also make sure to remove the dependencies as mentioned in the documentation to prevent future iOS app rejections.
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @Issue Owner
Current Issue Owner: @strepanier03The text was updated successfully, but these errors were encountered: