简体   繁体   English

Flutter Firebase 忘记密码

[英]Flutter Firebase Forgot password

I'm working on a project where I'm using the authentification of firebase to use the forgot password thing.我正在开发一个项目,我正在使用 firebase 的身份验证来使用忘记密码的东西。 However, I have a collection users that I use as well and need the password field to be updated in the collection as well.但是,我也有一个我使用的集合用户,并且也需要在集合中更新密码字段。 Any solutions please?请问有什么解决办法吗? I can't seem to find a way to get password from authentification.我似乎找不到从身份验证中获取密码的方法。

There is (very intentionally) no way to get a user's password from Firebase, and wanting to do so typically indicates an anti-pattern in your implementation.没有办法(非常有意地)从 Firebase 获取用户密码,并且想要这样做通常表明您的实现中存在反模式。

If you already verify the user's credentials elsewhere, you shouldn't use Firebase to do the same (but for example mint a custom token based on the external credentials).如果您已经在其他地方验证了用户的凭据,则不应使用 Firebase 来执行相同的操作(例如,根据外部凭据创建自定义令牌)。 If you use Firebase to verify the user's password, you shouldn't repeat that in your code (although you can for example decode the user's ID token to determine their identity ).如果您使用 Firebase 来验证用户的密码,则不应在您的代码中重复该密码(尽管您可以例如解码用户的 ID 令牌以确定他们的身份)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM