mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
refactor(console): update generated password length to 8 (#1545)
This commit is contained in:
parent
b8011a377a
commit
cba8da41fd
2 changed files with 2 additions and 2 deletions
|
@ -18,7 +18,7 @@ const ResetPasswordForm = ({ onClose, userId }: Props) => {
|
||||||
const api = useApi();
|
const api = useApi();
|
||||||
|
|
||||||
const onSubmit = async () => {
|
const onSubmit = async () => {
|
||||||
const password = nanoid();
|
const password = nanoid(8);
|
||||||
await api.patch(`/api/users/${userId}/password`, { json: { password } }).json<User>();
|
await api.patch(`/api/users/${userId}/password`, { json: { password } }).json<User>();
|
||||||
onClose?.(btoa(password));
|
onClose?.(btoa(password));
|
||||||
};
|
};
|
||||||
|
|
|
@ -35,7 +35,7 @@ const CreateForm = ({ onClose }: Props) => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const password = nanoid();
|
const password = nanoid(8);
|
||||||
|
|
||||||
const createdUser = await api.post('/api/users', { json: { ...data, password } }).json<User>();
|
const createdUser = await api.post('/api/users', { json: { ...data, password } }).json<User>();
|
||||||
onClose?.(createdUser, btoa(password));
|
onClose?.(createdUser, btoa(password));
|
||||||
|
|
Loading…
Reference in a new issue