forked from baron/baron-sso
feat: 어드민 프론트엔드 로그인 및 로그아웃 기능 구현 #243
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user