diff --git a/frontend/src/contexts/AuthContext.tsx b/frontend/src/contexts/AuthContext.tsx index 8dfd5a9..0e2a691 100644 --- a/frontend/src/contexts/AuthContext.tsx +++ b/frontend/src/contexts/AuthContext.tsx @@ -29,10 +29,8 @@ export const AuthContext = createContext( ); export function signOut() { - nookies.destroy(null, "accessToken"); - nookies.destroy(null, "refreshToken"); - nookies.set(null, "accessToken", "", { domain: '.42transcendence.me' }); - nookies.set(null, "refreshToken", "", { domain: '.42transcendence.me' }); + nookies.destroy(null, "accessToken", { domain: "42transcendence.me" }); + nookies.destroy(null, "refreshToken", { domain: "42transcendence.me" }); api.defaults.headers["Authorization"] = ""; window.location.replace("/"); }