mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
Only submit 2FA automatically once
This commit is contained in:
1 parent
fa1050d02d
commit
38e82bd8e3
1 file changed
+4
-1
@@ -13,6 +13,8 @@
|
||||
|
||||
let element: HTMLOListElement;
|
||||
|
||||
let autoSubmitted = false;
|
||||
|
||||
const {
|
||||
elements: { root, input }
|
||||
} = createPinInput({
|
||||
@@ -21,7 +23,8 @@
|
||||
onValueChange: ({ next }) => {
|
||||
value = next.join('');
|
||||
|
||||
if (value.length === 6) {
|
||||
if (value.length === 6 && !autoSubmitted) {
|
||||
autoSubmitted = true;
|
||||
const firstInputElement = element.querySelector('input');
|
||||
firstInputElement?.form.requestSubmit();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user