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
- 1Install the Supabase native integration from the Vercel Marketplace and link it to this project.
- 2Install the Auth0 native integration from the Vercel Marketplace and link it to this project.
- 3Run the SQL migrations in /supabase/migrations against the new Supabase project.
- 4Configure Supabase third-party auth for the Auth0 tenant.
- 5Deploy the tenant configuration in /auth0 with the Auth0 Deploy CLI.
- 6Set the remaining environment variables listed below.
- 7Run "pnpm seed" to create the admin and master accounts and email the first master one-time password.
- 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.MissingAUTH0_CLIENT_IDClient ID of the "SGT Partner Portal" application.MissingAUTH0_CLIENT_SECRETClient secret of the portal application.MissingAUTH0_SECRET32-byte hex secret that encrypts the Auth0 session cookie.MissingAPP_BASE_URLPublic origin of the portal, e.g. https://portal.example.com.MissingAUTH0_AUDIENCEIdentifier of the "SGT Portal API": https://api.sgt-portal.MissingAUTH0_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.MissingAUTH0_MGMT_CLIENT_IDM2M application authorised on the Auth0 Management API.MissingAUTH0_MGMT_CLIENT_SECRETSecret of the Management API M2M application.MissingAUTH0_RECOVERY_CLIENT_IDClient ID of "master-recovery-verifier" (password-realm grant on admin-recovery).MissingAUTH0_RECOVERY_CLIENT_SECRETSecret of "master-recovery-verifier".MissingAUTH0_ACTION_SHARED_SECRETHMAC secret shared with the post-login Action for /api/internal/auth/policy.MissingAUTH0_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.MissingNEXT_PUBLIC_SUPABASE_ANON_KEYSupabase anon key, set by the Vercel Supabase integration.MissingSUPABASE_SERVICE_ROLE_KEYService-role key, used only in server code.Missing
Portal
DOCUMENT_ENCRYPTION_KEY32 random bytes, base64, for AES-256-GCM document encryption.MissingPORTAL_SESSION_SECRET32+ character secret that signs admin and master session cookies.MissingCRON_SECRETProtects /api/internal/cron/master-expiry (Vercel Cron sends it automatically).Missing
RESEND_API_KEY(optional)Resend API key. If absent, SMTP_* is used.MissingSMTP_HOST(optional)SMTP host (fallback when RESEND_API_KEY is absent).MissingSMTP_PORT(optional)SMTP port, default 587.MissingSMTP_USER(optional)SMTP user.MissingSMTP_PASSWORD(optional)SMTP password.Missing
Developers
AUTH0_DEV_CLIENT_IDClient ID of the "SGT Developer Portal" application.MissingAUTH0_DEV_CLIENT_SECRETSecret of the "SGT Developer Portal" application.MissingAUTH0_API_PASSWORD_CLIENT_IDClient ID of "SGT API Password Client" (shown in docs).Missing
