mirror of
https://codeberg.org/MarkusThielker/next-ory.git
synced 2025-07-01 04:29:18 +00:00
NORY-16: check if session exists in middleware (dashboard)
This commit is contained in:
parent
24f7d0936f
commit
531f0453e7
3 changed files with 54 additions and 42 deletions
16
dashboard/src/components/auth/logout.tsx
Normal file
16
dashboard/src/components/auth/logout.tsx
Normal file
|
@ -0,0 +1,16 @@
|
|||
'use client';
|
||||
|
||||
import { LogOut } from 'lucide-react';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { LogoutLink } from '@/ory';
|
||||
|
||||
export function LogoutButton() {
|
||||
|
||||
const onLogout = LogoutLink();
|
||||
|
||||
return (
|
||||
<Button variant="outline" size="icon" onClick={onLogout}>
|
||||
<LogOut className="h-[1.2rem] w-[1.2rem]"/>
|
||||
</Button>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue