Firebase用户已删除,但仍在设备上登录 [英] Firebase user deleted but still logged in on device

查看:50
本文介绍了Firebase用户已删除,但仍在设备上登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始使用简单的emailAndPassword身份验证.我能够创建一个用户并登录.然后,我进入了Firebase控制台并删除了该用户.这不是应该在所有设备中注销吗?我仍然在onAuthStateChanged()和firebase.auth().currentUser中收到登录用户.我想念什么吗?我正在获取完整的用户信息,甚至在用户表中也不再存在.

I started playing with a simple emailAndPassword authentication. I was able to create a user and sign-in. Then I went to the firebase console and deleted the user. Isn't that supposed to log-out in all devices? I still receiving the logged-in user in onAuthStateChanged() and firebase.auth().currentUser. I am missing something? I am getting the full user info, even that doesnt exist anymore in the users table.

我正在使用 react-native-firebase 绑定

推荐答案

Firebase身份验证令牌有效期为一小时,并缓存在用户的设备上.客户端SDK会自动刷新它.删除帐户并不会主动联系所有用户的设备以删除令牌.

Firebase Authentication tokens are valid for one hour and cached on the user's device. It is automatically refreshed by the client SDK. Deleting the account doesn't proactively reach out to all the user's devices to delete the token.

但是,如果您随后尝试读取或写入需要身份验证的数据,则在使用缓存的令牌时应该会失败.

However, if you then try to read or write data that requires authentication, that should fail when using the cached token.

这篇关于Firebase用户已删除,但仍在设备上登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆