与Google的Firebase取消身份验证不允许更改用户 [英] firebase unauth with google doesn't allow change of user

查看:165
本文介绍了与Google的Firebase取消身份验证不允许更改用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Google项目或Firebase数据库中是否存在用于指定取消验证不应缓存用户凭据的设置?我已经通过Firebase Google身份验证登录到我的应用程序,调用unauth()不允许我使用其他帐户再次登录.尝试登录后,立即使用旧凭据登录,而无需输入新的用户名和密码.注销后关闭并重新打开浏览器无济于事.

Is there a setting, either in Google projects or in Firebase databases for specifying that unauth should not cache user credentials? One I have logged into my app via the Firebase Google authentication, calling unauth() does not permit me to log in again with a different account. An attempt to login after that immediately logs in with the old credentials without asking for a new username and password. Closing and reopening the browser after the logout didn't help.

推荐答案

使用Google身份验证时,Firebase无法访问您的凭据.相反,它使用OAuth在Google帐户和您的应用程序之间创建关系.

Firebase doesn't have access to your credentials when you use its Google authentication. Instead it uses OAuth to create a relationship between the Google account and your application.

当您呼叫unauth时,Firebase会终止当前会话中的令牌.但这不会删除Google帐户与您的应用程序之间的关系.这就是为什么您下次调用auth...时会自动"获得新令牌的原因.

When you call unauth Firebase expires the token that is part of the current session. But it does not remove the relationship between the Google account and your application. That's why you "automatically" get a new token when you call auth... next time.

每个用户都可以撤销权限,对于Google帐户,他们可以在帐户权限"页面上进行权限:

It is up to each individual user to revoke the rights, which in the case of a Google account they can do at the Account Permissions page: https://security.google.com/settings/security/permissions

这篇关于与Google的Firebase取消身份验证不允许更改用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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