diff --git a/src/app/(auth)/layout.tsx b/src/app/(auth)/layout.tsx index 170e403..d180f52 100644 --- a/src/app/(auth)/layout.tsx +++ b/src/app/(auth)/layout.tsx @@ -16,7 +16,8 @@ export default async function AuthLayout({ } // Redirect logged-in users to their dashboard - if (session?.user) { + // But NOT if they still need to set their password + if (session?.user && !session.user.mustSetPassword) { const role = session.user.role if (role === 'SUPER_ADMIN' || role === 'PROGRAM_ADMIN') { redirect('/admin')