forked from baron/baron-sso
관리자 비밀번호 변경을 Kratos 해시 업데이트 방식으로 수정
This commit is contained in:
@@ -499,6 +499,22 @@ export async function updateUser(userId: string, payload: UserUpdateRequest) {
|
||||
return data;
|
||||
}
|
||||
|
||||
export type PasswordPolicyResponse = {
|
||||
minLength?: number;
|
||||
lowercase?: boolean;
|
||||
uppercase?: boolean;
|
||||
number?: boolean;
|
||||
nonAlphanumeric?: boolean;
|
||||
minCharacterTypes?: number;
|
||||
};
|
||||
|
||||
export async function fetchPasswordPolicy() {
|
||||
const { data } = await apiClient.get<PasswordPolicyResponse>(
|
||||
"/v1/auth/password/policy",
|
||||
);
|
||||
return data;
|
||||
}
|
||||
|
||||
export async function deleteUser(userId: string) {
|
||||
await apiClient.delete(`/v1/admin/users/${userId}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user