这个问题在这里已经有了答案:
Firebase - Deleting and reinstalling app does not un-authenticate a user
(4 个回答)
2年前关闭。
使用firebase登录后,我想从我的应用程序中注销,我在我的应用程序中尝试了此代码,但它不起作用。
print("clickSignOut")
do {
try Auth.auth().signOut()
} catch {
print("can't signOut")strong text
}
print(Auth.auth().currentUser ?? "no user")
最佳答案
这总是对我有用:
do {
try Auth.auth().signOut()
} catch let error {
print("Error: ", error.localizedDescription)
}
如果这对您不起作用,请为我们提供更多背景信息。 “它不起作用”是什么意思?如果您使用提供的此代码,它将告诉您遇到了什么错误。
关于swift - 在 Swift 4 中退出 Firebase,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58806982/