Skip to content

Commit

Permalink
feat: destroy to domain
Browse files Browse the repository at this point in the history
  • Loading branch information
iaurg committed Dec 8, 2023
1 parent bf76400 commit 38497ac
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions frontend/src/contexts/AuthContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,8 @@ export const AuthContext = createContext<AuthContextType>(
);

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("/");
}
Expand Down

0 comments on commit 38497ac

Please sign in to comment.