Skip to main content
Skip to content
Security

How we secure your Shop data.

Foregrade connects to your TikTok Shop with scoped OAuth — read-only apart from actioning returns — and encrypts everything it syncs. Here's the detail a serious buyer needs before connecting.

OAuth scopes we request

Scoped access to the minimum endpoints needed to compute profit and return lifecycle. Every scope is read-only except return_refund.write, which lets you approve or reject returns from inside Foregrade instead of switching to Seller Center. We never request write access to inventory, listings, or pricing. When TikTok deprecates a scope, we re-authorize with the replacement and surface the new consent prompt.

  • seller.authorization.info — identifies which shop you linked, and the shop cipher every other call needs
  • order.read — per-order revenue + fee breakdown used for profit calculation
  • product.read — SKU metadata for COGS attribution
  • seller.read — shop info + performance scores behind the Health screen
  • reverse.read — return tracking + reverse-logistics events for the queue
  • return_refund.write — the only write scope: approve or reject returns without leaving Foregrade
  • affiliate.read — creator ROI on the Creators screen

You can revoke these at any time from TikTok Seller Center → Apps. Doing so freezes your dashboard at its last sync and stops future imports within seconds.

Encryption

  • In transit: TLS 1.2+ everywhere, HSTS preloaded on foregrade.io. No mixed-content.
  • At rest: AES-256-GCM on every row. OAuth access/refresh tokens are encrypted with a key held in hosting-provider env vars, never written to database in plaintext.
  • Sessions: iron-session cookies sealed with AEAD, httpOnly, SameSite=lax, 7-day inactivity timeout plus 30-day hard cap.

Data isolation

Every query is scoped by user_id at the database layer. There is no shared-table pattern where a missing clause could leak another seller's rows — every read is pre-filtered, every write is pre-authorized against the session user. A bug that forgot the filter would surface as an empty result set, not cross-tenant exposure.

Deletion SLA

You can delete your account from Settings → Security. We revoke the TikTok OAuth grant immediately, purge your orders / returns / products / buyers tables within 24 hours, and expunge encrypted backups on a 30-day rolling window. A deletion confirmation email goes out the moment the primary purge completes — not after the backup expiry.

Subprocessors

Every service that processes your data on our behalf. No marketing pixels, no analytics sold to third parties, no advertising cookies.

VendorPurposeRegion
SupabasePrimary database (Postgres) and auth helpersUS (AWS us-east-1 / Virginia)
RailwayApp hosting, Nixpacks build runtime, asset deliveryUS
StripeBilling, invoices, payment processingEU + US
ResendTransactional email deliveryEU + US
Upstash RedisRate limiting, session revocation flags, cacheUS (us-east-1)
SentryServer-side error monitoring (always on); client-side replay/perf opt-in via cookie consentEU + US
CloudflareDNS, edge TLS, basic DDoS / bot mitigation. Request metadata only — not used for caching responses with PII.Global edge

We notify you before adding or changing a subprocessor. New vendors with access to seller data require an SOC 2 Type II or equivalent third-party attestation.

Data controller & GDPR representatives

Controller: PRINCIPAL FOLIO LTD — a private limited company registered in England and Wales (company number 15631266) — is the data controller for UK sellers using the Service.

UK GDPR representative: Not required. Article 27 applies only to controllers established outside the UK, and PRINCIPAL FOLIO LTD is registered in England and Wales. UK data subjects can exercise their rights — access, rectification, erasure, restriction, portability and objection — by emailing privacy@foregrade.io, and may complain to the Information Commissioner's Office (ico.org.uk).

Responsible disclosure

Found a vulnerability? Email security@foregrade.io with a description and reproduction steps. We acknowledge within 48 hours and aim to resolve high-severity reports within 14 days. No public disclosure until the issue is patched, please.

Questions, compliance review, or procurement docs? Contact us.