So my app has the option to sign in with Google. Upon clicking the button that Google provides, a web view opens and has the user input their credentials. After allowing the app
public func logOut(on:UIViewController){
let firebaseAuth = Auth.auth()
do {
try firebaseAuth.signOut()
GIDSignIn.sharedInstance().signOut()
GIDSignIn.sharedInstance().disconnect()
if let url = NSURL(string: "https://www.google.com/accounts/Logout?continue=https://appengine.google.com/_ah/logout?continue=https://google.com"){
UIApplication.shared.open(url as URL, options: [:]) { (true) in
let appDel:AppDelegate = UIApplication.shared.delegate as! AppDelegate
appDel.window?.rootViewController = LoginViewController()
}
}
} catch let signOutError as NSError {
Help.shared.Snack(messageString: "Error signing out: \(signOutError)"
)
print ("Error signing out: %@", signOutError)
}
}