fix oidc auth login

This commit is contained in:
Windfarer
2026-05-04 22:58:13 +08:00
committed by lyingbug
parent db8abd3f9b
commit 6f3679716f
3 changed files with 93 additions and 18 deletions
+2 -2
View File
@@ -208,10 +208,10 @@ export async function autoSetup(): Promise<LoginResponse> {
/**
* 获取当前用户信息
*/
export async function getCurrentUser(): Promise<{ success: boolean; data?: { user: UserInfo; tenant: TenantInfo }; message?: string }> {
export async function getCurrentUser(): Promise<{ success: boolean; data?: { user: UserInfo; tenant?: TenantInfo | null }; message?: string }> {
try {
const response = await get('/api/v1/auth/me')
return response as unknown as { success: boolean; data?: { user: UserInfo; tenant: TenantInfo }; message?: string }
return response as unknown as { success: boolean; data?: { user: UserInfo; tenant?: TenantInfo | null }; message?: string }
} catch (error: any) {
return {
success: false,