diff --git a/FirebaseAuth/Tests/SampleSwift/AuthenticationExample/SceneDelegate.swift b/FirebaseAuth/Tests/SampleSwift/AuthenticationExample/SceneDelegate.swift index ae49583311a..e7965767a8a 100644 --- a/FirebaseAuth/Tests/SampleSwift/AuthenticationExample/SceneDelegate.swift +++ b/FirebaseAuth/Tests/SampleSwift/AuthenticationExample/SceneDelegate.swift @@ -48,6 +48,17 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { window?.makeKeyAndVisible() } + // Implementing this delegate method is needed when swizzling is disabled. + // Without it, reCAPTCHA's login view controller will not dismiss. + func scene(_ scene: UIScene, openURLContexts URLContexts: Set) { + for urlContext in URLContexts { + let url = urlContext.url + _ = Auth.auth().canHandle(url) + } + + // URL not auth related; it should be handled separately. + } + func scene(_ scene: UIScene, continue userActivity: NSUserActivity) { if let incomingURL = userActivity.webpageURL { handleIncomingDynamicLink(incomingURL)