Sign in verified accounts automatically and require eight-character passwords
This commit is contained in:
@@ -1,16 +1,17 @@
|
||||
import { readDeviceInfo } from './deviceInfo';
|
||||
import { PASSWORD_MIN_LENGTH } from '@hop/shared';
|
||||
import { createRefreshQueue } from './refreshQueue';
|
||||
import { ref } from 'vue';
|
||||
import { io } from 'socket.io-client';
|
||||
export const account = ref(null),
|
||||
registrationOpen = ref(false),
|
||||
passwordMinLength = ref(12);
|
||||
export async function refreshAccount() {
|
||||
passwordMinLength = ref(PASSWORD_MIN_LENGTH);
|
||||
export const refreshAccount = createRefreshQueue(async () => {
|
||||
const result = await api('/auth/me');
|
||||
account.value = result.account;
|
||||
registrationOpen.value = result.registrationOpen;
|
||||
passwordMinLength.value = result.passwordMinLength ?? 12;
|
||||
}
|
||||
passwordMinLength.value = result.passwordMinLength ?? PASSWORD_MIN_LENGTH;
|
||||
});
|
||||
export function reconnect() {
|
||||
connect();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user