feat: Ajout d'une fonction de logout

This commit is contained in:
N3WT DE COMPET
2025-02-17 18:18:52 +01:00
parent 8ea68bbad0
commit c2bba1abbf
7 changed files with 239 additions and 163 deletions

View File

@ -40,7 +40,12 @@ const options = {
})
],
session: {
jwt: true
jwt: true,
maxAge: 24 * 60 * 60, // 1 day in seconds
updateAge: 24 * 60 * 60 // Update session every day
},
jwt: {
maxAge: 24 * 60 * 60 // 1 day in seconds
},
callbacks: {
async jwt({ token, user }) {

View File

@ -1,9 +0,0 @@
import { signOut } from 'next-auth/react';
export default function SignOut() {
return (
<button onClick={() => signOut({ callbackUrl: '/' })}>
Sign out
</button>
);
}