Skip to content

Commit

Permalink
[Auth] When swizzling is disabled, open URLs via SceneDelegate (#13557)
Browse files Browse the repository at this point in the history
  • Loading branch information
ncooke3 authored Aug 29, 2024
1 parent 23579b7 commit ade83e9
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<UIOpenURLContext>) {
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)
Expand Down

0 comments on commit ade83e9

Please sign in to comment.