diff --git a/apps/dashboard/src/routes/invite/s/[hash]/+page.svelte b/apps/dashboard/src/routes/invite/s/[hash]/+page.svelte index e6bb12a5..31aa4543 100644 --- a/apps/dashboard/src/routes/invite/s/[hash]/+page.svelte +++ b/apps/dashboard/src/routes/invite/s/[hash]/+page.svelte @@ -117,6 +117,14 @@ } onMount(async () => { + // check if user has session, if not redirect to sign up with redirect back to this page + const { + data: { session } + } = await supabase.auth.getSession(); + if (!session) { + return goto(`/login?redirect=${$page.url?.pathname || ''}`); + } + setTheme(data.currentOrg?.theme || ''); });