diff --git a/Frontend/src/pages/login/TF/TOTP.svelte b/Frontend/src/pages/login/TF/TOTP.svelte index 804d3de..b9313b5 100644 --- a/Frontend/src/pages/login/TF/TOTP.svelte +++ b/Frontend/src/pages/login/TF/TOTP.svelte @@ -9,7 +9,7 @@ let code: string = ""; function send() { - loginState.useTOTP(id, code); + loginState.useTOTP(id, code.replace(/\s+/g, "")); } diff --git a/Frontend/src/pages/user/pages/TwoFactorRegistration/TOTP.svelte b/Frontend/src/pages/user/pages/TwoFactorRegistration/TOTP.svelte index 0caa15a..fdb39b7 100644 --- a/Frontend/src/pages/user/pages/TwoFactorRegistration/TOTP.svelte +++ b/Frontend/src/pages/user/pages/TwoFactorRegistration/TOTP.svelte @@ -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) { diff --git a/package.json b/package.json index 3883b72..158bf71 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@hibas123/openauth", - "version": "1.3.1", + "version": "1.3.2", "author": "Fabian Stamm ", "private": true, "scripts": {