0
Fork 0
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:
Gao Sun 2022-07-14 21:21:06 +08:00 committed by GitHub
parent b8011a377a
commit cba8da41fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -18,7 +18,7 @@ const ResetPasswordForm = ({ onClose, userId }: Props) => {
const api = useApi();
const onSubmit = async () => {
const password = nanoid();
const password = nanoid(8);
await api.patch(`/api/users/${userId}/password`, { json: { password } }).json<User>();
onClose?.(btoa(password));
};

View file

@ -35,7 +35,7 @@ const CreateForm = ({ onClose }: Props) => {
return;
}
const password = nanoid();
const password = nanoid(8);
const createdUser = await api.post('/api/users', { json: { ...data, password } }).json<User>();
onClose?.(createdUser, btoa(password));