r/AskProgramming • u/LostInTranslation44 • Oct 26 '26
Is there a way to secure my webapp without login
I've got a small public site where people can write into a shared page without signing up. No accounts on purpose. That also means I can't ban "a user," only a browser session or an IP range, and both of those are cheap to burn.
Right now I do the usual anonymous stuff: Cloudflare Turnstile on session mint, a short proof-of-work, a non-exportable device key in IndexedDB, rate limits, and a rotating refresh cookie. It slows down dumb scrapers. It does almost nothing against someone with residential proxies and a Turnstile solver farm.
Is there a durable approach here that isn't "add login"? Things I've seen tossed around:
- tighter per-/24 and IPv6 /64 device budgets
- behavioral signals (pointer rate, paste vs type) with a step-up challenge
- voiding votes from revoked devices at tally time
- Web Bot Auth for known agents (read-only)
What have you actually shipped on a no-account product that survived real abuse, not just load tests?
Site if it helps to see the shape of the problem: https://sharedpage.app
6
u/CorpT Oct 26 '26
Take it offline.
7
u/dontcriticizeasthis Oct 26 '26
You're doing a lot of extra work to avoid the "Add login" piece. Login functionality is a pretty normal thing to add. It might be worth asking yourself if avoiding it is really worth all the workarounds you're doing?
Unless you are doing something illegal on this webapp...
1
u/PLBjt Oct 26 '26
I'd stop trying to identify the visitor and make each action cost something instead. Votes are usually where the abuse pays off, so you could weight a vote by how old and how active the session was before the vote, and let fresh sessions count at a fraction until they've been around a day or two. A check that tells you if it works is looking at how many distinct sessions share the same /24 or the same TLS and header fingerprint in a tally window, since farms tend to cluster even behind residential proxies. The tradeoff is that real first-time visitors get muted votes, which can feel unfair, so I'd show them their vote counted and just discount it quietly at tally time. Delayed tallies also help because you can void a batch after the fact without anyone seeing it happen.
1
u/SnugglyCoderGuy Oct 26 '26
So you want open access but still be able to control access?
What exactly are you trying to achieve with all of these specific actions? If you were to describe it to a regular person in 1-3 sentences, what are you trying to achieve with this webapp?
1
u/not_roots Oct 26 '26
Maybe not a full solution but an idea worth exploring. You could utilize a small AI model or a fast classifier like Jev to analyze the posted word and if it makes any sense to the current page and / or sentence. If it's spam with some certainty, don't accept the word and don't allow that user to vote. Only valid contributions get to vote. Can be extended to getting more vote power the more good/valid contributions the user made.
1
u/Just-Upstairs4397 Oct 26 '26
You could create a session cookie only if the user passes bot check instead of checking every submit, for example. But without login, there is absolutely no way to truly block bad actors through the browser.
Many websites reduce login friction by offering Google sign-in, etc
To be honest, a userless website is kind of worthless
0
u/[deleted] Oct 26 '26
[removed] — view removed comment