egecankomur 95e30a74c7 fix: use admin client in onboarding guard to prevent accidental workspace creation
Session client (getUserTeams) can return null when the session token is
expired or stale. The old guard 'if (teams && teams.total > 0) redirect'
was bypassed when teams was null, allowing users to create duplicate
workspaces.

New guard uses admin client (API key, never session-dependent):
- lists user memberships via users.listMemberships(userId)
- checks for a tenant_settings row in this app
- redirects to /dashboard if found; shows form only for genuinely new users
2026-05-12 15:45:33 +03:00
S
Description
No description provided
5.4 MiB
Languages
TypeScript 99.4%
CSS 0.6%