I am writing an iOS app and have implemented both Google and Facebook sign in methods.
When I log out of the app, I am taken to my log in screen.
If I close the app and open it again, I am already logged back in.
I want it to take me to my log in screen, and for some reason it remembers my as logged in. Maybe I need to clean some sort of cache?
My logout function after clicking a button:
@IBAction func LogOutButtonPressed(_ sender: Any)
{
// MARK - should Prompt user if to log out
if (GIDSignIn.sharedInstance().currentUser != nil)
{
GIDSignIn.sharedInstance().signOut()
}
else if (FBSDKAccessToken.current() != nil)
{
let loginManager = FBSDKLoginManager()
loginManager.logOut()
}
// Unwind segue to login screen
isLoggingOut = true
}
I looked for an answer but couldn't find any similar to what I'm looking for.