From 5f7282986eaf4b8701ac23e4741a22bb98b39fc9 Mon Sep 17 00:00:00 2001 From: Daymon Date: Wed, 10 Jun 2026 13:51:49 -0500 Subject: [PATCH] Update SceneDelegate.swift --- .../AuthenticationExample/SceneDelegate.swift | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/FirebaseAuth/Tests/SampleSwift/AuthenticationExample/SceneDelegate.swift b/FirebaseAuth/Tests/SampleSwift/AuthenticationExample/SceneDelegate.swift index e7965767a8a..124f30a5b74 100644 --- a/FirebaseAuth/Tests/SampleSwift/AuthenticationExample/SceneDelegate.swift +++ b/FirebaseAuth/Tests/SampleSwift/AuthenticationExample/SceneDelegate.swift @@ -14,6 +14,8 @@ import FirebaseAuth import UIKit +import GoogleSignIn +import FacebookCore class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? @@ -53,10 +55,24 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { func scene(_ scene: UIScene, openURLContexts URLContexts: Set) { for urlContext in URLContexts { let url = urlContext.url - _ = Auth.auth().canHandle(url) + if Auth.auth().canHandle(url) { + continue; + } + // Handle Google signins + if GIDSignIn.sharedInstance.handle(url) { + continue; + } + // Handle Facebook signins + if ApplicationDelegate.shared.application( + UIApplication.shared, + open: url, + sourceApplication: urlContext.options.sourceApplication, + annotation: urlContext.options.annotation + ) { + continue + } + // URL not auth, Google, or Facebook related; it should be handled separately. } - - // URL not auth related; it should be handled separately. } func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {