diff --git a/backend/server/requirements.txt b/backend/server/requirements.txt index 5e2d10a..3f6b406 100644 --- a/backend/server/requirements.txt +++ b/backend/server/requirements.txt @@ -12,6 +12,7 @@ django-resized django-geojson setuptools gunicorn==23.0.0 +qrcode==8.0 # slippers==0.6.2 # django-allauth-ui==1.5.1 # django-widget-tweaks==1.5.0 \ No newline at end of file diff --git a/frontend/src/lib/components/TOTPModal.svelte b/frontend/src/lib/components/TOTPModal.svelte index 68b24bd..77da717 100644 --- a/frontend/src/lib/components/TOTPModal.svelte +++ b/frontend/src/lib/components/TOTPModal.svelte @@ -53,18 +53,10 @@ } async function sendTotp() { - console.log('sending totp'); - - let sessionid = document.cookie - .split('; ') - .find((row) => row.startsWith('sessionid')) - ?.split('=')[1]; - const res = await fetch('/_allauth/browser/v1/account/authenticators/totp', { method: 'POST', headers: { - 'Content-Type': 'application/json', - Cookie: `sessionid=${sessionid}` + 'Content-Type': 'application/json' }, body: JSON.stringify({ code: first_code @@ -73,7 +65,7 @@ }); console.log(res); if (res.ok) { - addToast('success', '2FA enabled'); + addToast('success', $t('settings.mfa_enabled')); is_enabled = true; getRecoveryCodes(); } else { @@ -125,10 +117,10 @@