Skip to content

Commit 1c99621

Browse files
authored
[Auth] When swizzling is disabled, open URLs via SceneDelegate
1 parent edc016b commit 1c99621

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

authentication/AuthenticationExample/SceneDelegate.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,17 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
4848
window?.makeKeyAndVisible()
4949
}
5050

51+
// Implementing this delegate method is needed when swizzling is disabled.
52+
// Without it, reCAPTCHA's login view controller will not dismiss.
53+
func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
54+
for urlContext in URLContexts {
55+
let url = urlContext.url
56+
_ = Auth.auth().canHandle(url)
57+
}
58+
59+
// URL not auth related; it should be handled separately.
60+
}
61+
5162
func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {
5263
if let incomingURL = userActivity.webpageURL {
5364
handleIncomingDynamicLink(incomingURL)

0 commit comments

Comments
 (0)