diff --git a/frontend/src/contexts/auth-context.tsx b/frontend/src/contexts/auth-context.tsx index f31fc6ff2..bfd2a818d 100644 --- a/frontend/src/contexts/auth-context.tsx +++ b/frontend/src/contexts/auth-context.tsx @@ -3,6 +3,7 @@ import { Role } from "../data/enums"; import React, { useContext, ReactNode, useState } from "react"; import { User } from "../data/interfaces"; import { setCurrentEdition } from "../utils/session-storage"; +import { setAccessToken, setRefreshToken } from "../utils/local-storage"; /** * Interface that holds the data stored in the AuthContext. @@ -92,6 +93,10 @@ export function logOut(authContext: AuthContextState) { authContext.setRole(null); authContext.setEditions([]); + // Remove tokens from LocalStorage + setAccessToken(null); + setRefreshToken(null); + // Remove current edition from SessionStorage setCurrentEdition(null); }