跟踪 ID 锁定的不成功登录尝试

发布于 2024-08-20 03:19:27 字数 157 浏览 3 评论 0原文

1) 典型的应用程序登录屏幕,超过 3 次尝试后,ID 会因密码错误而被锁定。

2) 尝试不能存储在会话中,因为用户可能在同一台或不同的计算机上使用多个浏览器。

3)我不想将计数保留在数据库中,因为必须在 24 秒左右后重置它。

最好的方法是什么?

1) A typical Login Screen of an application, ID locked for wrong passwords when more than three attempts.

2) The attempt cannot be stored in session, because user might use multiple browsers in same or different machine.

3) I don't want to persist the count in the database since one would have to reset it after 24rs or so.

What is the best way to do this?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

等风也等你 2024-08-27 03:19:27

您可以连续保存上次正确登录的日期、上次错误登录的日期和错误登录的次数。

如果计数超过 3 并且最后一次错误登录是在过去 X 分钟内,则会自动发生“锁定”。这样您就不必为了比较日期而重置任何内容;)

You can persist the date of last correct login, date of last wrong login and count of wrong logins in a row.

The "lock" would happen automatically if count exceeds 3 and the last wrong login was in last X minutes. That way you don't have to reset anything just to compare dates ;)

茶色山野 2024-08-27 03:19:27

您可能希望使用 IP 地址来跟踪不正确的登录尝试。

如果您想查看是否有人试图暴力破解密码,请使用 IP。

如果您尝试锁定忘记密码的用户,请通过用户名执行此操作。

You'd probably want to use IP address to track incorrect login attempts.

If you are looking to see if someone is trying to brute force a password, then use IP.

If you are trying to lock out users who forgot their password, do it by user name.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文