1
0
forked from baron/baron-sso

feat: 어드민 프론트엔드 로그인 및 로그아웃 기능 구현 #243

This commit is contained in:
2026-02-11 12:46:09 +09:00
parent afaac1781c
commit 8856485265
6 changed files with 277 additions and 97 deletions

View File

@@ -95,6 +95,26 @@ export async function fetchAuditLogs(limit = 50, cursor?: string) {
return data;
}
// Authentication
export type LoginRequest = {
loginId: string;
password?: string;
};
export type LoginResponse = {
sessionToken: string;
refreshToken?: string;
userId?: string;
};
export async function login(payload: LoginRequest) {
const { data } = await apiClient.post<LoginResponse>(
"/v1/auth/password/login",
payload,
);
return data;
}
export async function fetchTenants(limit = 50, offset = 0, parentId?: string) {
const { data } = await apiClient.get<TenantListResponse>(
"/v1/admin/tenants",