SAML2.0 using SFSafariViewController doesn't consistently fire Universal Links with application:continueUserActivity:restorationHandler:

After a successful SAML authentication with a third party IdP, our backend redirects the SFSafariViewController to a know path with some attributes as params. The app picks this Universal Link up in application:continueUserActivity:restorationHandler: most of the time but not every time. We've found that when the user uses an App like Microsoft Authenticator to do the auth, on return to the app the SFSafariViewController will show the dummy page we redirect to but application:continueUserActivity:restorationHandler: never fired for it. If the auth flow doesn't have the user leaving the app to use an Authenticator app it fires pretty consistently but not 100% consistently.

We've noticed if we do the Auth flow in the default browser instead of SFSafariViewController, on returning to the browser from the authenticator app we get the "Do you want to open this in {app name}" dialog instead of an automatic open in the app. But clicking open does indeed do the right thing WRT to application:continueUserActivity:restorationHandler:. If no authenticator in the mix it goes back into app 100% of the time with no "Do you want to open this in {app name}" (i.e. the Universal Link is setup correctly).

We are going to try ditching Universal Links and use URL scheme instead. Will update this with our findings.

Swapping over to URL Scheme instead of Universal Links makes no difference.

SAML2.0 using SFSafariViewController doesn't consistently fire Universal Links with application:continueUserActivity:restorationHandler:
 
 
Q