diff --git a/src/composables/useAdminSession.ts b/src/composables/useAdminSession.ts index 9333146..f120f4d 100644 --- a/src/composables/useAdminSession.ts +++ b/src/composables/useAdminSession.ts @@ -9,8 +9,13 @@ export function useAdminSession() { try { const response = await AuthService.verifyToken() - if (response.code === 200 && response.detail?.token) { - adminStore.login(response.detail) + // The current stored bearer token is what was just verified by the server. + // Do not redirect a valid session merely because an adapter omits a token + // field in the verification payload; only replace it when one is supplied. + if (response.code === 200) { + if (response.detail?.token) { + adminStore.login(response.detail) + } return true } } catch {