mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 13:39:24 +08:00
fix(auth): improve 401 error handling by checking for specific error codes
This commit is contained in:
parent
69575af6a9
commit
6140d30f30
@ -74,7 +74,7 @@ export function authCheckMiddleware({ app }: { app: Application }) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (error.status === 401 && !error.config?.skipAuth) {
|
if (error.status === 401 && !error.config?.skipAuth && firstError?.code && AuthErrorCode[firstError.code]) {
|
||||||
if (!firstError || firstError?.code === AuthErrorCode.SKIP_TOKEN_RENEW) {
|
if (!firstError || firstError?.code === AuthErrorCode.SKIP_TOKEN_RENEW) {
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user