Skip to content

Commit

Permalink
fix: remove ProjectId on logout
Browse files Browse the repository at this point in the history
  • Loading branch information
suhailkakar committed Oct 10, 2024
1 parent 9d69521 commit d58d0e7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/www/hooks/use-api/tokenStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useProjectContext } from "context/ProjectContext";

export const TOKEN_KEY = "PERSISTENT_TOKEN";
export const REFRESH_TOKEN_KEY = "REFRESH_TOKEN";
export const PROJECT_ID_KEY = "projectId";

export const storeToken = (token: string, refreshToken: string) => {
try {
Expand Down Expand Up @@ -35,6 +36,7 @@ export const clearTokens = () => {
try {
localStorage.removeItem(TOKEN_KEY);
localStorage.removeItem(REFRESH_TOKEN_KEY);
localStorage.removeItem(PROJECT_ID_KEY);
} catch (err) {
console.error(`Error clearing persistent token: ${err.message}.`);
}
Expand Down

0 comments on commit d58d0e7

Please sign in to comment.