diff --git a/apps/web/.env b/apps/web/.env index 09592a12e7..c2780343f2 100644 --- a/apps/web/.env +++ b/apps/web/.env @@ -1,9 +1,11 @@ NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_ZXBpYy1jaGFtb2lzLTg1LmNsZXJrLmFjY291bnRzLmRldiQ NEXT_PUBLIC_CLERK_FRONTEND_API=https://epic-chamois-85.clerk.accounts.dev + +# https://clerk.com/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in -NEXT_PUBLIC_CLERK_SIGN_IN_FORCE_REDIRECT_URL=/ -NEXT_PUBLIC_CLERK_SIGN_IN_FALLBACK_REDIRECT_URL=/ NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up -NEXT_PUBLIC_CLERK_SIGN_UP_FORCE_REDIRECT_URL=/ -NEXT_PUBLIC_CLERK_SIGN_UP_FALLBACK_REDIRECT_URL=/ +NEXT_PUBLIC_CLERK_SIGN_IN_FORCE_REDIRECT_URL=/authorized +NEXT_PUBLIC_CLERK_SIGN_UP_FORCE_REDIRECT_URL=/authorized +NEXT_PUBLIC_CLERK_SIGN_IN_FALLBACK_REDIRECT_URL=/authorized +NEXT_PUBLIC_CLERK_SIGN_UP_FALLBACK_REDIRECT_URL=/authorized diff --git a/apps/web/src/app/(authenticated)/layout.tsx b/apps/web/src/app/(authenticated)/layout.tsx index 3aa8c2e6d0..7bab169c6b 100644 --- a/apps/web/src/app/(authenticated)/layout.tsx +++ b/apps/web/src/app/(authenticated)/layout.tsx @@ -23,6 +23,7 @@ export default async function AuthenticatedLayout({ // Set enhanced Sentry context for authenticated users. const { userId, orgId, orgRole } = authResult; setSentryUserContext({ id: userId, orgId, orgRole }); + if (orgId && orgRole) { setSentryOrganizationContext(orgId, orgRole); } diff --git a/apps/web/src/app/(centered)/signed-out/page.tsx b/apps/web/src/app/(centered)/signed-out/page.tsx new file mode 100644 index 0000000000..19b04ee353 --- /dev/null +++ b/apps/web/src/app/(centered)/signed-out/page.tsx @@ -0,0 +1,18 @@ +'use client'; + +import { useEffect } from 'react'; +import { LoaderCircle } from 'lucide-react'; + +export default function Page() { + useEffect(() => { + setTimeout(() => { + window.location.href = '/sign-in'; + }, 1000); + }, []); + + return ( +