Cookie Policy
Last updated: April 2026
This Cookie Policy explains how Foregrade ("we", "us", "our") uses cookies and similar technologies when you visit foregrade.io.
1. What Are Cookies
Cookies are small text files stored on your device when you visit a website. They are widely used to make websites work efficiently and to provide information to site owners.
2. Session Cookies (Strictly Necessary)
These cookies are essential for the operation of Foregrade. Without them, you would not be able to log in or use the application securely.
| Cookie | Purpose | Duration |
|---|---|---|
fg_session | Encrypted session cookie powered by iron-session. Stores your authenticated session data (httpOnly, secure). | Session / 7 days |
fg_csrf | CSRF protection token used to prevent cross-site request forgery attacks (httpOnly, secure). | Session |
fg_oauth_state | Temporary OAuth state parameter used during TikTok Shop login to prevent authorization code interception (httpOnly, secure). | 10 minutes |
fg_2fa_pending | Short-lived cookie set after a correct password during two-factor authentication. Tracks the in-progress 2FA verification step so we can validate your TOTP / backup code without re-prompting for the password (httpOnly, secure). | 5 minutes |
fg_oauth_link_mode | Internal flag set when an authenticated user starts a "link additional shop" OAuth flow, so the callback handler knows to attach the result to the existing account rather than creating a new one (httpOnly, secure). | 10 minutes |
fg_referral | Records the affiliate / referral code that brought you to the site so the eventual signup can credit the correct partner. Set only when you arrive via a `?ref=` URL parameter (httpOnly). | 30 days |
3. Preference Cookies (Functional)
These cookies remember your preferences to provide a more personalized experience.
| Cookie | Purpose | Duration |
|---|---|---|
theme | Stores your preferred color scheme (light or dark mode) so the application renders correctly on subsequent visits. | 1 year |
4. Browser localStorage (similar technologies)
In addition to cookies, Foregrade uses your browser's localStorage for two pieces of UI state. Unlike cookies, localStorage values are not sent to our servers — they live entirely in your browser.
| Key | Purpose | Duration |
|---|---|---|
foregrade_cookie_consent | Records that you have acknowledged the cookie banner so it doesn't reappear on every visit. Stores only a boolean and a timestamp — no tracking identifiers. | Until cleared |
foregrade_theme_pref | Mirrors the theme cookie so the "light/dark" choice is applied on first paint without a server round-trip (avoids the "flash of wrong theme" on cold reloads). | Until cleared |
5. Analytics and Error Monitoring
We use Sentry for error monitoring and application performance tracking. Sentry helps us detect and fix bugs by collecting error details and stack traces. Sentry does not collect personally identifiable information (PII) and does not use cookies for advertising or cross-site tracking.
We do not use any third-party analytics cookies (such as Google Analytics), advertising cookies, or social media tracking cookies.
6. Third-Party Cookies
Foregrade does not set any third-party tracking or advertising cookies. The only third-party services that may set cookies are:
- Stripe: May set cookies during the checkout and payment process for fraud prevention and payment processing.
7. Managing Cookies
You can control and delete cookies through your browser settings. Please note that disabling strictly necessary cookies (session cookies) will prevent you from logging into Foregrade.
Most browsers allow you to:
- View what cookies are stored and delete them individually
- Block third-party cookies
- Block cookies from specific sites
- Block all cookies
- Delete all cookies when you close the browser
8. Changes to This Policy
We may update this Cookie Policy from time to time. We will notify you of material changes by updating the "Last updated" date at the top of this page.
9. Contact
If you have questions about our use of cookies, contact us at support@foregrade.io.
For more information about how we handle your data, please see our Privacy Policy.