I am using newest Firebase API (3.2.1) and I am using this code to check if user is signed in:
override func viewDidAppear(animated: Bool) {
super.viewDi
do { try Auth.auth().signOut() }
catch { print("already logged out") }
Typically, on your "base" screen, something like ...
func logoutUser() {
// call from any screen
do { try Auth.auth().signOut() }
catch { print("already logged out") }
navigationController?.popToRootViewController(animated: true)
}