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

查看:22
本文介绍了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天全站免登陆