mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
fix: clear authentication tokens on user deletion
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
||||
import { AxiosError } from "axios";
|
||||
|
||||
import SecurityClient from "@app/components/utilities/SecurityClient";
|
||||
import { apiRequest } from "@app/config/request";
|
||||
import { SessionStorageKeys } from "@app/const";
|
||||
import { queryClient as qc } from "@app/hooks/api/reactQuery";
|
||||
@@ -86,6 +87,8 @@ export const useDeleteMe = () => {
|
||||
localStorage.removeItem("tag");
|
||||
localStorage.removeItem("PRIVATE_KEY");
|
||||
localStorage.removeItem("orgData.id");
|
||||
setAuthToken("");
|
||||
SecurityClient.setToken("");
|
||||
|
||||
queryClient.clear();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user