Skip to content

Commit

Permalink
feat: add followups
Browse files Browse the repository at this point in the history
  • Loading branch information
devsargam committed Dec 6, 2024
1 parent ed2beb1 commit 8bace22
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/app/invalidsession/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
1 change: 1 addition & 0 deletions src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export async function middleware(req: NextRequestWithAuth) {
if (pathname.startsWith('/api/mobile')) {
return withMobileAuth(req);
}
console.log('pathname', pathname);
return await withAuth(req);
}

Expand Down

0 comments on commit 8bace22

Please sign in to comment.