Fix TOTP space bug, caused by space inserted by cleavejs

This commit is contained in:
Fabian Stamm 2023-04-15 00:06:06 +02:00
parent dd39ece408
commit 6bcda75634
3 changed files with 3 additions and 3 deletions

View File

@ -9,7 +9,7 @@
let code: string = ""; let code: string = "";
function send() { function send() {
loginState.useTOTP(id, code); loginState.useTOTP(id, code.replace(/\s+/g, ""));
} }
</script> </script>

View File

@ -31,7 +31,7 @@
verifingTOTP = true; verifingTOTP = true;
verifyError = undefined; verifyError = undefined;
try { try {
await InternalAPI.TwoFactor.VerifyTOTP(totp.id, code); await InternalAPI.TwoFactor.VerifyTOTP(totp.id, code.replace(/\s/g, ""));
stage = "done"; stage = "done";
dispatch("reload"); dispatch("reload");
} catch (err) { } catch (err) {

View File

@ -1,6 +1,6 @@
{ {
"name": "@hibas123/openauth", "name": "@hibas123/openauth",
"version": "1.3.1", "version": "1.3.2",
"author": "Fabian Stamm <dev@fabianstamm.de>", "author": "Fabian Stamm <dev@fabianstamm.de>",
"private": true, "private": true,
"scripts": { "scripts": {