yo-next-auth/app/[locale]/(protected)/cabinet/page.tsx

19 lines
381 B
TypeScript

import { auth, signOut } from '@/config/auth'
const CabinetPage = async () => {
const session = await auth()
return (
<div>
{JSON.stringify(session)}
<form action={async () => {
'use server'
await signOut()
}}>
<button type="submit">SignOut {session?.user.role}</button>
</form>
</div>
)
}
export default CabinetPage