Authentication finaly redirect to auth page

This commit is contained in:
2025-02-20 22:15:28 +01:00
parent 3268f065d3
commit 950090c762

View File

@@ -67,11 +67,7 @@ export const authProvider: AuthProvider = {
onError: async (error) => {
if (error?.status === 401) {
localStorage.removeItem("access_token");
return Promise<{
redirectTo: "/login",
logout: true,
error: { message: "Unauthorized" },
}>;
return {redirectTo: "/login"}
}
return {};
},