Authentication finaly redirect to auth page
This commit is contained in:
@@ -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 {};
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user