通过记住成功的验证码用户来减少验证码调用 [英] Reduce captcha calls by remembering successful captcha users

查看:54
本文介绍了通过记住成功的验证码用户来减少验证码调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种解决方案来减少我需要进行的验证码调用次数.

I'm looking for a solution to reduce the number of captcha calls I need to make.

我有一个网站,允许免费使用一个带有文本框和按钮的应用程序.用户可能会使用它 10 次,因此我调用了 10 次验证码.然而,这加起来是一笔我无法继续负担的荒谬费用.我需要一个解决方案来跟踪成功的验证码,以便如果成功,用户只会收到一个验证码.

I have a website that allows free usage for one app with a text box and button. Users might use it 10 times, and thus I call captcha 10 times. However, this adds up to a ridiculous expense I can't continue to afford. I need a solution to track successful captcha so a user receives only one captcha if successful.

我的想法:

  1. 成功验证码
  2. 在 redis 中存储真实的用户标识符(散列 IP、用户代理和 WebRTC(不完全知道这是什么,但我被推荐使用它))
  3. 未来的调用通过检查用户的哈希标识符(90 天的 TTL)来检查用户是否有效

还有其他建议或建议吗?有什么潜在的问题吗?

Any other recommendations or suggestions? Any potential problems?

PS:有关此用例中 WebRTC 的信息也会有所帮助

PS: info about WebRTC in this use case would be helpful as well

推荐答案

我决定使用 IPUser-Agent 的散列客户端可以被欺骗(甚至 User-Agent 也可以).为了对抗欺骗,我添加了 ip 速率限制.

I decided to use a hash of the IP and User-Agent considering everything I would take from the client can be spoofed (even the User-Agent can be). To combat the spoofing, I added ip rate limiting.

现在,在从客户端进行 API 调用之前,我会先调用以验证用户是否是经过验证的用户(我认为经过验证的验证码是 24 小时的非机器人验证.随着时间的推移,我会搞砸这一点).

Now before making API calls from the client, I make a call to verify that the user is a verified user (I consider a validated captcha a non-robot verification for 24 hours. I'll mess with increasing this over time).

这应该可以有效地减少 60% 的验证码调用.

This should effectively reduce my captcha calls by 60%.

这篇关于通过记住成功的验证码用户来减少验证码调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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