refactor(auth): 将认证状态迁移至独立登录 store

This commit is contained in:
yelan
2026-08-31 10:58:05 +08:00
parent a5e0a80191
commit a261a978f2
6 changed files with 111 additions and 73 deletions
-2
View File
@@ -1,7 +1,6 @@
import axios from 'axios'
import { request } from '@/utils/request'
import { saveAuthSession } from '@/utils/auth-storage'
import type {
AuthenticatedUser,
CurrentUserResponse,
@@ -78,7 +77,6 @@ export async function login(payload: LoginRequest): Promise<LoginResponse> {
user: normalizeAuthenticatedUser(session.user),
}
saveAuthSession(normalizedSession)
return normalizedSession
}