Skip to content

Commit

Permalink
fix: invalidate access token on 401
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemSBulgakov committed Mar 31, 2024
1 parent 9177ed1 commit 8d37f91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/events/api/axios.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getMyAccessToken } from "@/lib/auth/access";
import { getMyAccessToken, invalidateMyAccessToken } from "@/lib/auth/access";
import Axios, { AxiosRequestConfig } from "axios";

export const AXIOS_INSTANCE = Axios.create({
Expand All @@ -18,7 +18,7 @@ AXIOS_INSTANCE.interceptors.response.use(
async (error) => {
const { response } = error;
if (response.status === 401) {
// invalidateMyAccessToken();
invalidateMyAccessToken();
return Promise.reject(error);
}
},
Expand Down

0 comments on commit 8d37f91

Please sign in to comment.