From 146fc4830ce1bbd96f28cecbec9a65f56dc84048 Mon Sep 17 00:00:00 2001
From: HEPOSHEIKKI
Date: Wed, 8 May 2024 12:52:50 +0300
Subject: [PATCH] Added QR code to TOTP setup
---
package.json | 3 +-
.../(local_user)/password/+page.svelte | 11 +-
yarn.lock | 434 ++++++++++++------
3 files changed, 292 insertions(+), 156 deletions(-)
diff --git a/package.json b/package.json
index f785e6a1..54a12128 100644
--- a/package.json
+++ b/package.json
@@ -47,7 +47,8 @@
"@dicebear/core": "^6.0.4",
"@dicebear/initials": "^6.0.4",
"markdown-it": "^13.0.1",
- "mono-svelte": "latest"
+ "mono-svelte": "latest",
+ "svelte-qrcode": "^1.0.0"
},
"overrides": {
"@rollup/plugin-node-resolve": "^15.2.3",
diff --git a/src/routes/profile/(local_user)/password/+page.svelte b/src/routes/profile/(local_user)/password/+page.svelte
index 66bfec04..cb984150 100644
--- a/src/routes/profile/(local_user)/password/+page.svelte
+++ b/src/routes/profile/(local_user)/password/+page.svelte
@@ -9,6 +9,7 @@
import { page } from '$app/stores'
import Switch from '$lib/components/input/Switch.svelte'
import { feature } from '$lib/version.js'
+ import QrCode from "svelte-qrcode"
export let data
@@ -80,6 +81,7 @@
toast({ content: e as any, type: 'error' })
}
}
+
Credentials
@@ -125,6 +127,8 @@
{#if totpEnabled || totpLink}
{#if totpLink && !totpEnabled}
+ Scan this code using your authenticator app or add it manually
+
-
- Paste this in your authenticator app.
-
+
+
{/if}