Replies: 6 comments 10 replies
-
Interesting - I wonder if this whole block: react-native-firebase/packages/auth/ios/RNFBAuth/RNFBAuthModule.m Lines 984 to 1010 in 3c0dc54 Might need a Can you try this locally since you have a reproduction case all set up and reproducing? reaching right into node_modules and just hacking at the objective-c to put the try/catch in and handle the catch with that reject should be pretty quick If it works "patch-package" is the trick to make it persistent https://github.com/ds300/patch-package and a PR would be fantastic |
Beta Was this translation helpful? Give feedback.
-
@mikehardy Do you have any further insight into this? |
Beta Was this translation helpful? Give feedback.
-
@mikehardy I've started to look into _verificationFailedHandler(state) {
const snapshot = {
verificationId: state.verificationId,
code: null,
error: null,
state: 'error',
};
snapshot.error = new NativeFirebaseError({ userInfo: state.error }, this._jsStack, 'auth');
this._emitToObservers(snapshot);
this._emitToErrorCb(snapshot); // Changed to this._emitToSuccessCb(snapshot) and it at least passes the snapshot back to the client.
this._removeAllListeners();
} never seems to pass the snapshot back to the client. However, if you use |
Beta Was this translation helpful? Give feedback.
-
As for the second point
Notice the last conditional. This seems to be the culprit. Is there a way of emitting if auto retrieve is not being used? It wouldn't seem like the best user experience to have to wait until a timeout to get the response back. Not sure if that's possible to determine if it has been auto retrieved, but I would think if it's android and it is auto retrieved then we don't emit the success callback immediately. Also, it appears iOS autoverifies the recaptcha so I'm not sure if that is the same is "auto retrieve". If so, perhaps that conditional can be ommited? |
Beta Was this translation helpful? Give feedback.
-
Below is my patch. I'm not sure how permanent it is, but it solves the issues presented in the videos above.
|
Beta Was this translation helpful? Give feedback.
-
Hi @mikehardy @Salakar @Ehesp, any help here? |
Beta Was this translation helpful? Give feedback.
-
I'm following the MFA-like Account Creation and it's been super simple to follow and works great. However, in local development I'm running into an issue where canceling the reCAPTCHA results in an unhandled promise (successfully verifying seems to work as expecte). The code that seems to be at play here is:
and wrapping this in a
try/catch
doesn't seem to resolve the issue. Is there a way to catch this so it can be gracefully handled? I'd like to catch it in order to stop the progress bar from animating as seen in the video below.Screen.Recording.2024-02-22.at.2.15.48.PM.mov
Beta Was this translation helpful? Give feedback.
All reactions