diff --git a/apps/dashboard/src/lib/utils/functions/appSetup.ts b/apps/dashboard/src/lib/utils/functions/appSetup.ts index 79ebf4fc..def2a27b 100644 --- a/apps/dashboard/src/lib/utils/functions/appSetup.ts +++ b/apps/dashboard/src/lib/utils/functions/appSetup.ts @@ -90,6 +90,12 @@ export async function getProfile({ } = await supabase.from('profile').select(`*`).eq('id', authUser?.id).single(); console.log('Get profile', profileData); + if (authUser?.email?.endsWith('@test.com')) { + // This is a test email, auto logout + window.location.href = '/logout'; + return; + } + if (error && !profileData && status === 406 && authUser) { // User wasn't found, create profile console.log(`User wasn't found, create profile`);