StoneGran Tech

SGT Partner Portal

Setup required

The portal code is deployed, but its infrastructure is not connected yet. Finish provisioning with the steps in SETUP.md, then reload this page.

Provisioning checklist

  1. 1Install the Supabase native integration from the Vercel Marketplace and link it to this project.
  2. 2Install the Auth0 native integration from the Vercel Marketplace and link it to this project.
  3. 3Run the SQL migrations in /supabase/migrations against the new Supabase project.
  4. 4Configure Supabase third-party auth for the Auth0 tenant.
  5. 5Deploy the tenant configuration in /auth0 with the Auth0 Deploy CLI.
  6. 6Set the remaining environment variables listed below.
  7. 7Run "pnpm seed" to create the admin and master accounts and email the first master one-time password.
  8. 8Redeploy. This page is replaced by the sign-in page once AUTH0_DOMAIN and NEXT_PUBLIC_SUPABASE_URL are set.

Environment variables

Auth0

  • AUTH0_DOMAINAuth0 tenant domain, set by the Vercel Auth0 integration.Missing
  • AUTH0_CLIENT_IDClient ID of the "SGT Partner Portal" application.Missing
  • AUTH0_CLIENT_SECRETClient secret of the portal application.Missing
  • AUTH0_SECRET32-byte hex secret that encrypts the Auth0 session cookie.Missing
  • APP_BASE_URLPublic origin of the portal, e.g. https://portal.example.com.Missing
  • AUTH0_AUDIENCEIdentifier of the "SGT Portal API": https://api.sgt-portal.Missing
  • AUTH0_SUPABASE_AUDIENCE(optional)Identifier of the "SGT Supabase" API (default https://supabase.sgt-portal); portal-user tokens carry this audience so Supabase RLS sees the user.Missing
  • AUTH0_MGMT_CLIENT_IDM2M application authorised on the Auth0 Management API.Missing
  • AUTH0_MGMT_CLIENT_SECRETSecret of the Management API M2M application.Missing
  • AUTH0_RECOVERY_CLIENT_IDClient ID of "master-recovery-verifier" (password-realm grant on admin-recovery).Missing
  • AUTH0_RECOVERY_CLIENT_SECRETSecret of "master-recovery-verifier".Missing
  • AUTH0_ACTION_SHARED_SECRETHMAC secret shared with the post-login Action for /api/internal/auth/policy.Missing
  • AUTH0_LOG_STREAM_TOKENBearer token the Auth0 log stream sends to /api/internal/auth0/logs.Missing

Supabase

  • NEXT_PUBLIC_SUPABASE_URLSupabase project URL, set by the Vercel Supabase integration.Missing
  • NEXT_PUBLIC_SUPABASE_ANON_KEYSupabase anon key, set by the Vercel Supabase integration.Missing
  • SUPABASE_SERVICE_ROLE_KEYService-role key, used only in server code.Missing

Portal

  • DOCUMENT_ENCRYPTION_KEY32 random bytes, base64, for AES-256-GCM document encryption.Missing
  • PORTAL_SESSION_SECRET32+ character secret that signs admin and master session cookies.Missing
  • ADMIN_EMAILThe administrator identity ([email protected]).Missing
  • MASTER_EMAILThe master recovery identity ([email protected]).Missing
  • CRON_SECRETProtects /api/internal/cron/master-expiry (Vercel Cron sends it automatically).Missing

Email

  • RESEND_API_KEY(optional)Resend API key. If absent, SMTP_* is used.Missing
  • SMTP_HOST(optional)SMTP host (fallback when RESEND_API_KEY is absent).Missing
  • SMTP_PORT(optional)SMTP port, default 587.Missing
  • SMTP_USER(optional)SMTP user.Missing
  • SMTP_PASSWORD(optional)SMTP password.Missing
  • SENDER_EMAIL(optional)Sender address, default [email protected].Missing

Developers

  • AUTH0_DEV_CLIENT_IDClient ID of the "SGT Developer Portal" application.Missing
  • AUTH0_DEV_CLIENT_SECRETSecret of the "SGT Developer Portal" application.Missing
  • AUTH0_API_PASSWORD_CLIENT_IDClient ID of "SGT API Password Client" (shown in docs).Missing