r/AskProgramming • • 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

5 Upvotes

20 comments sorted by

6

u/CorpT Oct 26 '26

Take it offline.

1

u/LostInTranslation44 Oct 26 '26

I will keep that as my last resort

1

u/DIYC_Official Oct 26 '26

Take it offline lol

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/LostInTranslation44 Oct 26 '26

Nah, nothing shady, I just don’t want the first action to be “create an account.”

The whole point of the experiment is: open the page and you’re already in the essay. Login is normal and I’d ship it in a day if the product was “your private notebook.” This one’s closer to a public whiteboard — if signup is the door, half the people bounce before they type a word.

So yes, I’m paying for that with Turnstile/PoW/device keys. I’m not pretending it’s as strong as auth. I’m asking whether you can get “good enough” integrity for a shared writing room without forcing identity first.

If it fails in the wild I’ll add login. For now the constraint is the product. I am trying to see if anyone is working on anything interesting in this aspect

1

u/JSouthGB Oct 28 '26

You could make the content public but put editing behind auth

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/LostInTranslation44 Oct 26 '26

First-timers getting muted votes is the ugly part, but if the UI still says it counted, I can live with that for a while. Gonna try a dumb v1: age-weighted votes + cluster spike -> discount/void in the seal window.

thanks for this

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/LostInTranslation44 Oct 27 '26

I want anyone to open the page and help write one shared essay, one word per minute, with no signup. At the same time I need enough friction that one person (or a bot farm) can’t flood the room with fake voters and drown out everyone else or start spamming nonsense words.

1

u/SnugglyCoderGuy Oct 27 '26

So, people come, they can nominate one (or more?) words to the next word of this shared essay. Once per minute on a regular period the present users get to vote on which of the nominated words will be added to the essay.

You want people to be able to just jump right into it when they go to your site.

You only want humans to be able to be able to engage with this.

Is this a correct understanding? Sorry for all questions and what not, I need to understand what you want to be in order to be best able to figure out how to get there.

1

u/LostInTranslation44 Oct 27 '26

No worries, I want to have discussion about this. So you can check out the page for yourself its here https://sharedpage.app/

How it works

Every minute, the crowd adds one word to today's document.

  • Click the red box to join the current round.
  • In the first 30 seconds of each minute, you can type and submit one word. Each player can submit one word per minute. Submitting votes for that word.
  • For the whole minute, you can vote for any submitted word, including your own.
  • Click another word to move your vote. Click the word you voted for to remove it. You can change your vote until the minute ends.
  • When the minute ends, the word with the most votes is added to the document. If two words have the same number of votes, the earliest submission wins.
  • If no word was submitted or nobody voted, the round is skipped and nothing is added.

here is how it works, I basically want people to jump in without any friction of login or auth and start contributing to the essay, but at the same time protect against coordinated bot attacks. I know it sounds contradictory but I am looking at it as a challenge and wondering if there are anyone else working on any novel ideas to tackle this niche. So yeah your understanding is correct

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/LostInTranslation44 Oct 27 '26

I thought about this approach but the problem with that is I want the experience of submitting a word and it showing up for voting be instantaneous. that is why I have a strict rule book to only censor certain words, I am thinking of an ai model to retrospectively remove words after they are added in document if needed, but even a very fast classifier will slow down the submition experience which I do not want

1

u/not_roots Oct 27 '26

I haven't played around yet with classifiers but read a bit about it. Depending on the model used, response times between a few ms up to a few hundred ms even on a single cpu core should still feel fast enough.

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

1

u/LostInTranslation44 Oct 26 '26

Yep, that’s already the main write throttle. An anonymous device can submit at most once per minute (and only in the first ~30s of the minute); after that, it’s vote-only until the next minute.

Doesn’t stop a solver farm with N keys, but it does make “buy a solve → dump spam” a lot less efficient than free-fire posting.