basic auth working with google sign in button

This commit is contained in:
talksik
2021-12-13 14:27:39 -08:00
parent fd5699a6f0
commit e566de6b92
10 changed files with 211 additions and 28 deletions
+15 -5
View File
@@ -7,17 +7,27 @@
import SwiftUI
import Firebase
import GoogleSignIn
@main
struct nirvana_iosApp: App {
init() {
FirebaseApp.configure()
}
@UIApplicationDelegateAdaptor(AppDelegate.self) var delegate
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
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)
}
}