working auth handler and listener and successfuly changing auth and all

This commit is contained in:
talksik
2021-12-14 14:56:58 -08:00
parent 60723a5118
commit d8070b30f3
2 changed files with 16 additions and 7 deletions
+10 -6
View File
@@ -13,9 +13,8 @@ import GoogleSignIn
struct nirvana_iosApp: App {
@StateObject var authSessionStore: AuthSessionStore = AuthSessionStore()
init() {
self.setupAuth()
}
@UIApplicationDelegateAdaptor private var appDelegate: AppDelegate
var body: some Scene {
WindowGroup {
@@ -24,8 +23,13 @@ struct nirvana_iosApp: App {
}
}
extension nirvana_iosApp {
private func setupAuth() {
FirebaseApp.configure()
class AppDelegate: NSObject, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
FirebaseApp.configure()
return true
}
func application(_ application: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any]) -> Bool {
return GIDSignIn.sharedInstance.handle(url)
}
}