【发布时间】:2018-03-13 18:33:41
【问题描述】:
我正在尝试解决 firebase 身份验证中缺少用户名属性的问题,并且正在考虑将用户名存储在用户配置文件本身的 UserInfo.displayName 属性中。这是必要的,以便我可以在安全规则中获取显示名称为auth.token.name,然后将其用作用户名。
但是,updateProfile 方法似乎没有被锁定,因此可以想象用户可以使用他们的令牌破解 api 并直接调用 updateProfile 以将该显示名称更改为其他人的用户名。 https://firebase.google.com/docs/reference/js/firebase.User#updateProfile
有没有办法可以锁定该 displayName 以使其在客户端或注册后无法编辑?
【问题讨论】:
标签: firebase firebase-authentication firebase-security