◉RORK LABJP
●GPT-6.1 SOL — Added to Rork's model menu (09-29) with Low, Medium and High effort; included on Pro and Max●SONNET 5.5 — Claude Sonnet 5.5 is selectable: strong at UI design and faster than Sonnet 5 (09-28)●SDK 58 — Beta since 09/15 with no stable date yet; running projects in Expo Go has required login since 09/03●WIDGET — A write-up traces an iOS widget that renders black only in production builds●OBSERVE — EAS Observe now records native crashes too (SDK 57.0.21 or later, 10/07)●NEW — My App Open Ad Only Showed When the App…●GPT-6.1 SOL — Added to Rork's model menu (09-29) with Low, Medium and High effort; included on Pro and Max●SONNET 5.5 — Claude Sonnet 5.5 is selectable: strong at UI design and faster than Sonnet 5 (09-28)●SDK 58 — Beta since 09/15 with no stable date yet; running projects in Expo Go has required login since 09/03●WIDGET — A write-up traces an iOS widget that renders black only in production builds●OBSERVE — EAS Observe now records native crashes too (SDK 57.0.21 or later, 10/07)●NEW — My App Open Ad Only Showed When the App…
Articles/Dev Tools
⬡ Dev Tools/2026-04-21Advanced

Protecting Your Rork App From Fraudulent Purchases and Request Spoofing — A Complete Server-Side Validation Design With App Attest and Play Integrity

A complete walkthrough of how to protect your Rork app's revenue and API endpoints from request spoofing and IAP fraud using Apple's App Attest and Google's Play Integrity APIs, with runnable Cloudflare Workers code and StoreKit 2 JWS verification.

Rork585Security9App AttestPlay IntegrityStoreKit 217server validationindie dev30

✦ Premium Article

About six months into the life of any paid app on the App Store or Google Play, a particular kind of support email starts showing up: "I can't purchase." You suspect your own code at first, but dig in and a non-trivial share turn out to come from clients sending doctored receipts or spoofed API requests. For an indie developer whose app has finally started to sell, leaving this unchecked quietly erodes monthly revenue.

In this article I'll walk through how I harden the API entry points of a Rork-built app using Apple's App Attest and Google's Play Integrity, with the verification layer sitting on Cloudflare Workers. This isn't a product overview — it's the exact pitfalls I ran into adding this to a subscription app, along with the code that's been running in production since.

When combined with StoreKit 2 JWS verification and Google Play Billing signature checks, you can finally assert three things from the server: that the request came from a real build of your app, from a real device, and at a rate your pricing model actually anticipated.

Why device attestation stopped being optional

Let me share a rough picture of the current state first. Even at indie scale, as long as your app is publicly listed on App Store or Play, you will see a steady trickle of the following attack patterns:

  • Fake receipts for purchase spoofing: Doctored StoreKit receipts used to unlock paid features for free. This bites hardest when receipt validation lives only on the client
  • Direct API pounding: Attackers extract your API endpoints from the binary and hit them directly with Python or Postman. This is the single biggest leak for apps that wrap an LLM
  • Feature use after IAP refunds: Users chargeback through their card issuer and then keep using the feature because the app flips a local flag
  • Bypass tooling on jailbroken devices: Small communities distribute automated bypass tools, mostly on iOS

It's tempting to assume that as a solo developer no one targets you, but mass automated scanners pick you up anyway. On my own app, moving from "no attestation" to "App Attest + Play Integrity" reduced unauthorized hits on the AI endpoint from over 7,000 per month to under 50. The integration took a day, runs at effectively zero monthly cost, and is the highest-leverage security investment I've ever made.

What App Attest and Play Integrity actually prove

It's worth clearing up what these APIs do. Both App Attest on iOS and Play Integrity on Android are there to cryptographically prove to your server:

  • App integrity: The binary being run has not been tampered with
  • Device integrity: The device is not jailbroken, rooted, or running a custom bootloader
  • Distribution authenticity: The app came from the real App Store or Play Store

They answer the question "what is calling me?" not "who is calling me?" They're orthogonal to user authentication (Clerk, Supabase Auth, and so on). Stacked together, you can finally say "the real user, on a real device, is running the real app."

App Attest returns a public-key-based attestation object. Play Integrity returns a JWE/JWS token. The formats differ, but the server-side verification flow shapes up almost identically.

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦You'll finally have a complete, working pattern for integrating App Attest and Play Integrity into a Rork app — the thing most tutorials gloss over
✦You can now run cross-platform server-side validation on Cloudflare Workers, with real code you can drop into production today
✦Combined with StoreKit 2 JWS verification, you can stop the slow drain on subscription revenue that hits most indie developers after six months
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Rork Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

Related Articles

⬡ Dev Tools2026-10-13
Before You Ship: Go Looking for Your Own Keys Inside the Exported Expo Bundle
A key can be missing from your source and still be sitting inside the finished app. I ran expo export on Expo SDK 57, searched the bundle with grep and a short Node script, and recorded which secrets show up and which don't.
⬡ Dev Tools2026-05-18
Adapting Your Rork iOS App to iPhone Air and 17 Pro Series — Layout Patterns for 2026's New Resolutions
iPhone Air introduced a 420pt width that sits between the standard and Max models, quietly breaking layout conditionals in existing Rork apps. Based on updating four iOS apps at once, this covers device constant management, Safe Area handling, and full-screen image display fixes.
⬡ Dev Tools2026-04-28
Why In-App Purchases Disappear with Family Sharing — Building Bulletproof IAP for Family Apps with Rork
Subscription revenue from Family Sharing purchases can vanish days after the sale settles. This guide shows the four refund triggers, a complete StoreKit 2 + Server Notifications V2 implementation in Rork, and a sandbox testing matrix that catches family edge cases before launch.