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 = "";
function send() {
loginState.useTOTP(id, code);
loginState.useTOTP(id, code.replace(/\s+/g, ""));
}
</script>

View File

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

View File

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