[BUG] iOS: authenticationPresentingViewController error when confirming payment sheet with 3DS
Describe the bug
When attempting to confirmPaymentSheetPayment, I encounter the following error on iOS with a 3DS payment and on a modal presentation view
To Reproduce
- Open a
modalpresentation view- init payment
- attempt to confirm the payment with
confirmPaymentSheetPayment - -> the 3DS screen is not displayed and i get the following error:
authenticationPresentingViewController is already presenting. You should probably dismiss the presented view controller in prepareAuthenticationContextForPresentation
- Works correctly with a classic payment (no 3DS)
- Works correctly on Android
- Works correctly on
containedModalpresentation view
Expected behavior The 3DS screen should be displayed on top of the stack.
Smartphone:
- Device: iPhone 15 Plus Simulator
- OS: iOS 17.5
Additional context
- Expo version: 51.0.34
- @stripe/stripe-react-native version: 0.38.6
- React Native version: 0.74.5
- @react-navigation
The 3DS screen opening normaly in a modal view seems conflict with my current modal view
Did you note some issues with a "modal" presentation view and 3DS screen?
I opened a bug on react native because the Modal behaviour changed a lot and was not addressed in changelog. I think that Stripe problem with 3d secure depend on this: https://github.com/facebook/react-native/issues/47694 I also opened a bug here to fix this: https://github.com/stripe/stripe-react-native/issues/1772