forked from baron/baron-sso
feat(adminfront): add user profile dropdown and enhance session sync
This commit is contained in:
@@ -436,6 +436,26 @@ export async function deleteUser(userId: string) {
|
||||
await apiClient.delete(`/v1/admin/users/${userId}`);
|
||||
}
|
||||
|
||||
export type UserProfileResponse = {
|
||||
id: string;
|
||||
email: string;
|
||||
name: string;
|
||||
phone: string;
|
||||
role: string;
|
||||
department: string;
|
||||
affiliationType: string;
|
||||
companyCode?: string;
|
||||
tenantId?: string;
|
||||
metadata?: Record<string, unknown>;
|
||||
tenant?: TenantSummary;
|
||||
manageableTenants?: TenantSummary[];
|
||||
};
|
||||
|
||||
export async function fetchMe() {
|
||||
const { data } = await apiClient.get<UserProfileResponse>("/v1/user/me");
|
||||
return data;
|
||||
}
|
||||
|
||||
// Relying Party Management
|
||||
export type RelyingParty = {
|
||||
clientId: string;
|
||||
|
||||
Reference in New Issue
Block a user