Language: Swift4
Login Implementation: Using Auth0 Swift SDK.
Test Platforms: iOS11 simulator, iPhone6 Plus running iOS10
Integrated Social Platforms: Google, Microsoft Live
Intention: Want to log the user out on the application level and clear SSO session after the user pressed the log out button, so the next time they want to log in, they would have to enter in their social credentials in a SafariViewController.
Current Implementation:
Auth0.webAuth().clearSession(federated: false) { (isLoggedOut) in
if isLoggedOut{
DispatchQueue.main.async {
let keychain = A0SimpleKeychain(service: "Auth0")
keychain.clearAll()
//Perform UI Updates
})
}
}
}
Current Behavior(Not what I am expecting): When tapping on the login with Google button on the login page, it doesn’t ask for credentials, and logs in the user directly. (Which would be the intended and expected behavior if I didn’t clear the SSO session.)
Question: Is the clearSession() API under the WebAuth protocol working as intended? or Am I misusing it?