Answers · Shopify apps

Triple Whale's fixes are now Shopify's rules: how to add an IP allowlist and expiring tokens to your Shopify app before the deadlines

If you run a Shopify app, the two fixes at the top of Triple Whale's Dec 3 incident account are no longer optional extras. Triple Whale says its Shopify API access "only works from our own servers' IP addresses, so a stolen token can't be used anywhere else" and its access tokens "expire within an hour". Shopify now requires both: public apps need an IP allowlist (apps without one were delisted and blocked from new installs on Nov 20, 2026), and public apps still on non-expiring offline tokens are delisted on Jan 1, 2027, with their Admin API requests rejected from Apr 1, 2027.

The allowlist is a Dev Dashboard setting, no app release needed: list your servers' public IPs (or, on serverless hosts, their ASNs narrowed to countries), run Shopify's test against 30 days of your traffic, then turn on enforcement. Expiring tokens are a code change: request them with expiring=1 (or the template's expiringOfflineAccessTokens flag), store the refresh token, and refresh before the hour is up.

What Triple Whale says happened (its account, Dec 3)

  • Unauthorized access to some internal systems was detected Oct 31 and contained Nov 1; it revoked credentials and rotated "every API token and key where possible". It attributes the attack to AI agents using the ARTEX framework.
  • About a third of its clients were affected to different degrees: their shoppers' names, emails, phones, addresses and order details could have been accessed; no passwords, bank details or full card numbers. Affected brands were emailed from Nov 3.
  • On Dec 2 it found the same attacker had also reached parts of its CRM: shop names and contacts, internal revenue figures and which integrations each shop connected. It believes the attacker may have employee email addresses for up to 74,000 merchants, and some merchants have already received emails from the attacker.
  • Its Shopify App Store listing has been down since the incident.

Which deadlines apply to your app (per Shopify's docs)

  • IP allowlist, public apps: bulk queries and mutations blocked without one from Nov 12, 2026; delisted and blocked from new installs from Nov 20, 2026 (existing installs keep working); merchants see a warning in their admin from Jan 15, 2027.
  • IP allowlist, custom apps installed on stores outside your organization: required for new installs from Nov 20, 2026, and for every such existing install from Jan 1, 2027. Recommended, not required, for apps only on your own stores.
  • Expiring offline tokens: required for public apps created since Apr 1, 2026 and for every app created since Dec 1, 2026. Older public apps: delisted Jan 1, 2027, merchant warning Jan 15, Admin API requests with a non-expiring token rejected Apr 1, 2027. Custom and merchant-created apps made before Dec 1, 2026 can keep their tokens.

Set up the IP allowlist

  1. Find the addresses your app calls Shopify from. On a server with a fixed address, ask from that server:

    curl -s https://checkip.amazonaws.com

    Behind a NAT gateway, allow the gateway's address; if your servers reach Shopify over IPv6, include those too. On serverless hosts whose addresses change, Shopify lets you allow up to 10 ASNs instead, narrowed to up to 10 countries. Its own caution: anyone else running servers in an ASN you allow can use a stolen token from there, so prefer fixed IPs when you can. The Dev Dashboard's Logs show the client IP of your app's recent requests.

  2. Check the list against Shopify's rules before you paste it: at most 250 entries, IPv4 ranges /16 or narrower, IPv6 /32 or narrower, public addresses only, each range starting at its network address. Save one entry per line in allowlist.txt, then:

    python3 - allowlist.txt <<'EOF'
    import ipaddress, sys
    lines = [l.strip() for l in open(sys.argv[1]) if l.strip()]
    if len(lines) > 250: print(f"too many entries: {len(lines)} (max 250)")
    for l in lines:
        try: n = ipaddress.ip_network(l)
        except ValueError as e: print(f"{l}: {e}"); continue
        if n.version == 4 and n.prefixlen < 16: print(f"{l}: wider than /16")
        if n.version == 6 and n.prefixlen < 32: print(f"{l}: wider than /32")
        if not n.is_global: print(f"{l}: not a public address")
    EOF

    No output means every line passes. 52.4.7.9/24 fails with "has host bits set" (write 52.4.7.0/24), and 10.0.0.0/8 fails twice. Documentation ranges such as 203.0.113.0/24 also show as not public, which is right: they're only examples.

  3. Add it in the Dev Dashboard, test, then enforce. Open the app, Settings, Manage next to IP allowlist; enter the addresses (and any ASNs plus countries); under Test against recent traffic click Run test to see whether any of your own requests from the last 30 days would be blocked; then turn on Enforce IP allowlist and save. It applies to every store at once and isn't part of shopify.app.toml, so no new app version.

  4. Prove it blocks. From a machine that isn't on the list (your laptop), with a current access token for a dev store:

    curl -s -o /dev/null -w '%{http_code}\n' -X POST \
      "https://$SHOP/admin/api/2026-10/graphql.json" \
      -H "X-Shopify-Access-Token: $TOKEN" -H 'Content-Type: application/json' \
      -d '{"query":"{ shop { name } }"}'

    Expect 403. Watch for two things that break: Shopify Flow's Send HTTP request action and Admin API calls from an Oxygen-hosted storefront are always rejected under an allowlist, because Shopify can't confirm their source address. Requests from your app's embedded pages and admin or POS extensions (direct API access) and dev previews are never rejected. If your app makes no Admin API calls with its own tokens, you can block all addresses instead, which also meets the requirement.

Move to expiring offline tokens

  1. Built from Shopify's Remix or React Router app template: add the flag to shopifyApp() in shopify.server.ts and redeploy with shopify app deploy. The template stores and refreshes tokens itself.

    future: {
      expiringOfflineAccessTokens: true,
    },
  2. Your own token exchange or OAuth code grant: add -d 'expiring=1' to the request you already send to https://{shop}.myshopify.com/admin/oauth/access_token. Store access_token, refresh_token, expires_in and refresh_token_expires_in (an access token lasts 1 hour, a refresh token 90 days; read the values rather than hard-coding them).

  3. Refresh before the hour is up, server-side, for background jobs and webhooks:

    curl -s -X POST "https://$SHOP/admin/oauth/access_token" \
      -d grant_type=refresh_token \
      -d "client_id=$CLIENT_ID" -d "client_secret=$CLIENT_SECRET" \
      --data-urlencode "refresh_token=$REFRESH_TOKEN" \
      | jq '{expires_in, refresh_token_expires_in}'

    Every refresh returns a new refresh token: save both new tokens together and refresh from the new one next time. Refresh one store at a time (two workers refreshing the same store can strand one of them). Network errors, timeouts, 5xx and 429 are safe to retry with the same refresh token; 401 with {"error": "invalid_request"} is final, so stop and re-authenticate the next time the merchant opens your app. Pipe through jq only while testing: the full response holds both tokens, so don't log it.

  4. Existing installs that nobody opens: exchange each stored non-expiring token for an expiring pair (token exchange with subject_token_type and requested_token_type set to urn:shopify:params:oauth:token-type:offline-access-token plus expiring=1; see Shopify's migration guide). This permanently invalidates the old token for the Admin API, so store the new pair first. Shopify's third route is application-only tokens signed with a private key, which also last up to an hour and need no refresh token.

  5. Confirm nothing still sends an old token. In the Dev Dashboard Logs, filter Type to GraphQL request (then REST request) and Token type to Offline, non-expiring. When that's empty, you can turn on Admin API token expiry in Settings to block old tokens early (it takes up to 30 minutes, and you can turn it off until the mandatory date). Rejections carry the phrase Non-expiring access tokens are no longer accepted for the Admin API; a missing scope is also a 403, so match the message before re-authenticating.

The rest of Triple Whale's list, for any SaaS

  • Every user signs in with Google SSO or two-factor authentication; rate limits on sign-in and sign-up.
  • New sign-ups screened, and disposable email addresses blocked. API keys issued only to verified email addresses.
  • Tighter permissions for internal services, audit logging, and alerts that let engineers pause sign-ups, restrict a shop or shut down an account.
  • If you're a merchant: Triple Whale says anything real comes from an @triplewhale.com address, it won't call without notice from your contact there, and suspicious emails should be forwarded to its security address rather than answered.

What isn't known or we didn't verify

  • How the attacker got in. Triple Whale's account doesn't say, and doesn't say whether Shopify tokens were used.
  • The ARTEX attribution is Triple Whale's; we haven't seen independent confirmation tied to this incident.
  • Which brands were affected, and whether shoppers' data has been misused. Neither is public.
  • Whether an allowlist or expiring tokens would have stopped this attack. Shopify's docs say they limit what a stolen token can do; that's the claim we make, nothing more.
  • We tested the allowlist check and the refresh request against a local mock, not a live store. Dates and limits are Shopify's as published today and can change; check the linked pages before a deadline.

Checked against Triple Whale: An update on the Triple Whale security incident (Dec 3, 2026), Shopify: Restrict API access with an IP allowlist, Shopify: Migrate to expiring offline access tokens, Shopify: Access tokens (lifetimes), Shopify: Refresh an expiring offline token on 2026-12-04. Only test apps and accounts you own or are allowed to test.