JSON服务器在任何用户属性上都会生成新密码

发布于 2025-01-22 11:21:01 字数 213 浏览 4 评论 0原文

我正在使用Json-Server和Json-Auth嘲笑我的React应用程序的后端。因此,我有一个情况,需要给出“无活动”的用户状态。当我检查db.json时,我可以看到每当用户的ISACTIVE属性发生更改时,都会更改加密密码。因此,我没有收到他的错误消息,因为他被阻止了,他会收到消息,即密码不正确。 Json-Server和Json-Auth的这种正常行为是否有解决方法?我希望我的问题很清楚。提前致谢。

I am using json-server and json-auth to mock backend of my react app. So i have a situation where i need to give a user status of "inactive". When i check db.json i can see that whenever a change of isActive property of user happens, encrypted password is being changed. So instead of my user getting error message that he is blocked he gets message that password is not correct. Is this normal behavior of json-server and json-auth and is there any workaround? I hope my question is clear. Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文