diff options
| author | Adam Soltys <[email protected]> | 2026-03-04 23:06:35 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-03-04 23:06:35 -0800 |
| commit | e5f37b003d93a17c2a9958697269b2d3228d8830 (patch) | |
| tree | e2c3a3c4d1bec48d323e830f5be35d5832845a9a /src/routes/(static) | |
| parent | e6882c6a8987e23215a2538b242431ae603c7101 (diff) | |
| download | coinos-ui-e5f37b003d93a17c2a9958697269b2d3228d8830.tar.gz coinos-ui-e5f37b003d93a17c2a9958697269b2d3228d8830.zip | |
tuning
Diffstat (limited to 'src/routes/(static)')
| -rw-r--r-- | src/routes/(static)/login/+page.svelte | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/routes/(static)/login/+page.svelte b/src/routes/(static)/login/+page.svelte index 0e920d5c..8cb4cf45 100644 --- a/src/routes/(static)/login/+page.svelte +++ b/src/routes/(static)/login/+page.svelte @@ -217,6 +217,19 @@ console.log("Auth key derivation failed, falling back to legacy login", e); return async ({ result }: any) => { if (result.type === "success") { + try { + const { deriveAuthKeypair, deriveWalletEntropy } = await import("$lib/deriveAuthKey"); + const { sk } = await deriveAuthKeypair(uname, pw); + const oldPrfKey = await deriveWalletEntropy(sk); + await resolveCanonicalKey( + passwordMethodId(), + sk.buffer as ArrayBuffer, + result.data?.encryptedKeys, + oldPrfKey, + ); + } catch (e2) { + console.log("PRF key caching in legacy fallback failed", e2); + } await invalidateAll(); goto(result.data?.redirectUrl || "/"); } else { |
