The browser makes a key
On load, your app creates a key pair with WebCrypto. The private key is non-exportable, so not even DevTools can read it.
The server checks it's really your app
The public key is registered once. The server checks the browser Origin and a bot check (Cloudflare Turnstile).
Every request is signed
Method, path, body, timestamp and a one-time nonce are signed. Change anything, or send it twice, and it's rejected.
Your app
browserA normal request from your frontend. The interceptor signs it automatically.
Headers the interceptor added
Attacker
cURL / PostmanThey opened DevTools and used Copy as cURL on your request:
Send a transfer from the app first →
Server log
| From | Request | Result | Why |
|---|---|---|---|
| No requests yet. | |||
In this demo, the server runs inside this page so you can see both sides.
In production, it's your backend: the Go middleware or @request-shield/server for Node/Express, Bun, Deno and Workers.
The demo skips the Turnstile bot check.
What it doesn't stop
- Automated real browsers (Puppeteer/Playwright) running your actual app can still sign requests. Turnstile makes this expensive; add rate limiting.
- Users acting through your own app. That's normal use. Authorization still belongs on the server.
- It isn't login. It proves which client sent the request, not which user. Keep your JWT/session auth.