【发布时间】:2017-01-03 07:29:48
【问题描述】:
我正在尝试在我的 iOS 应用程序中使用 Firebase 3 注销用户。这是我的代码:
do {
databaseReference.child("Users").child(CUUID!).removeAllObservers()
try FIRAuth.auth()?.signOut()
print("FIRUSER - \(FIRAuth.auth()?.currentUser)")
self.performSegueWithIdentifier("logOutSegue", sender: self)
} catch let logOutError {
print("Error Logging User Out - \(logOutError)")
}
如果用户成功注销,我正在尝试执行返回登录屏幕的操作。为了检查用户是否已注销,我打印currentUser 以查看是否还有一个。我点击了logOut 按钮并且segue 工作(没有catch -> 没有错误),但是当print("FIRUSER - \(FIRAuth.auth()?.currentUser)") 代码运行时,我仍然得到一个currentUser。 为什么用户没有退出?
【问题讨论】:
标签: ios swift xcode firebase firebase-authentication