React-native-auth0: App switch to confirm 2FA breaks authentication flow (iOS)

Created on 13 Nov 2019  Â·  7Comments  Â·  Source: auth0/react-native-auth0

See also this post in the Community forum.

We are trying to log in via our corporate ADFS provider. This works perfectly well on the iOS Simulator and on iOS devices that are on our corporate network, but for off-network devices, we require two-factor authentication via the Microsoft Authenticator app.

The problem is that post-ADFS login, the user switches to the Authenticator app to approve the request, but when we return to our app that’s using react-native-auth0, we see a “Safari cannot open the page because the network connection was lost” message in the auth flow’s view controller. Reloading has no effect and the cycle simply repeats if I try again.

Reproduction

  • Open an Auth0 webAuth session against an IdP that requires confirmation from an application such as Microsoft Authenticator on the same device
  • Respond to 2FA confirmation request, causing app switch away from Auth0-using app
  • Return to Auth0-using app following switch

Environment

Please provide the following:

  • Version of this library used: 1.6.0
  • Version of the platform or framework used, if applicable: React Native 0.60.5
  • Other relevant versions (language, server software, OS, browser): iOS 13.2.2
  • Other modules/plugins/libraries that might be involved: Microsoft Authenticator 6.3.22

Note: I intend to work on a fix and file a PR for this within the next day or so.

bug

All 7 comments

Hi @pcurc, apologies for the delay. I just tested this with RN 0.61.5 on iOS 13.3 and wasn't able to reproduce. Do you have a sample app showcasing the issue that you can share with us?

Closing this one. If this is still an issue for you, please reply.

Are you able to capture a video of your successful reproduction? I don't see any change in the code other than what I have done in #257 that would make this non-reproducible, assuming the steps noted where an app switch happens mid-authentication are followed.

@pcurc here's a 2FA flow on iOS 13.3:

RPReplay_Final1582905389

If you can provide a video of this issue or an example app, that'd be helpful.

Thank you so much for providing. The difference for the flow I was experiencing is that it's a 2FA app switch that results from a push notification (i.e. as a user, I'm not initiating the app switch using the switcher as shown here, I'm responding to the push notification to trigger the switch). Let me see what I can capture.

Please see below for a screen capture of the behavior described (iOS 13.3.1, RN 0.60.5, react-native-auth0 2.3.0, on an iPhone 7).
IDPLosesNetworkConnection

@pcurc thanks for providing a video.

Was this page helpful?
0 / 5 - 0 ratings