diff --git a/src/app/invalidsession/page.tsx b/src/app/invalidsession/page.tsx index 3d178f59e..1f988184b 100644 --- a/src/app/invalidsession/page.tsx +++ b/src/app/invalidsession/page.tsx @@ -7,15 +7,18 @@ import { toast } from 'sonner'; const page = () => { useEffect(() => { - signOut({ - callbackUrl: '/signin', - }); - toast('Too many devices connected. Logging out!', { - action: { - label: 'Close', - onClick: () => toast.dismiss(), - }, - }); + (async () => { + toast('Too many devices connected. Logging out!', { + action: { + label: 'Close', + onClick: () => toast.dismiss(), + }, + }); + await new Promise((resolve) => setTimeout(resolve, 1000)); + await signOut({ + callbackUrl: '/signin', + }); + })(); }, []); return (