Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
d5f86cf
feat(fe): add attribute consent page scaffolding with utilities
sea-snake Apr 10, 2026
fedaaeb
feat(fe): integrate consent screen into all three authorization flows
sea-snake Apr 10, 2026
9e75ef4
fix(fe): authorize before redirecting to consent, fix error handling
sea-snake Apr 10, 2026
d75789c
feat(fe): implement attribute response sending in consent page
sea-snake Apr 10, 2026
d035cbf
refactor(fe): remove legacy attribute support from consent page, ICRC…
sea-snake Apr 10, 2026
d530a92
refactor(fe): consent screen is ICRC-3 only, legacy flow unchanged
sea-snake Apr 10, 2026
f648f35
feat(fe): add derivation origin validation and ICRC-3-only consent flow
sea-snake Apr 10, 2026
3f7f31c
fix(fe): standalone attribute requests resolve auth channel so UI ren…
sea-snake Apr 10, 2026
7844dd3
fix(fe): resolve TODOs, pass issuer via URL param, fix URL handling
sea-snake Apr 10, 2026
49eed14
fix(fe): use locale store for attribute labels instead of hardcoded s…
sea-snake Apr 10, 2026
137f861
feat(fe): merge email/verified_email into single consent entry, inter…
sea-snake Apr 10, 2026
04e4727
fix(e2e): revert OpenID consent redirect to fix existing e2e tests
sea-snake Apr 13, 2026
02c09a3
fix(fe): revert standalone attribute listener to fix authorizationCon…
sea-snake Apr 13, 2026
33f601d
fix(fe): fix unsubscribe reference before initialization in attribute…
sea-snake Apr 13, 2026
ebbfe3b
fix(fe): avoid calling unsubscribe during synchronous callback dispatch
sea-snake Apr 13, 2026
479a83e
refactor(fe): request-driven authorize flow with idle timeout
sea-snake Apr 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
INVALID_PARAMS_ERROR_CODE,
} from "$lib/utils/transport/utils";
import { authorizationStore } from "$lib/stores/authorization.store";
import {
resetIdleTimeout,
startIdleTimeout,
} from "$lib/stores/authorize-flow.store";
import { z } from "zod";
import FeaturedIcon from "$lib/components/ui/FeaturedIcon.svelte";
import Button from "$lib/components/ui/Button.svelte";
Expand Down Expand Up @@ -45,13 +49,29 @@

const authorizeChannel = (channel: Channel): Promise<void> =>
new Promise<void>((resolve, reject) => {
let resolved = false;

// When any recognized request arrives, reset the idle timeout
// so the flow stays active.
channel.addEventListener("request", (request) => {
if (request.id === undefined) {
return;
}
if (
request.method === "icrc34_delegation" ||
request.method === "ii-icrc3-attributes"
) {
resetIdleTimeout();
}
});

// Handle delegation requests
channel.addEventListener("request", async (request) => {
if (
request.id === undefined ||
request.method !== "icrc34_delegation" ||
$authorizationStore !== undefined
) {
// Ignore if it's a different method, or we're already processing
return;
}
const result = DelegationParamsCodec.safeParse(request.params);
Expand All @@ -78,9 +98,12 @@
request.id,
result.data,
);
resolve();
if (!resolved) {
resolved = true;
resolve();
}
} catch (error) {
console.error(error); // Log error to console
console.error(error);
reject(
new AuthorizeChannelError(
$t`Unverified origin`,
Expand All @@ -89,6 +112,21 @@
);
}
});

// Handle standalone attribute requests (resolve auth UI if not already)
channel.addEventListener("request", (request) => {
if (
request.id === undefined ||
request.method !== "ii-icrc3-attributes"
) {
return;
}
authorizationStore.setOrigin(channel.origin);
if (!resolved) {
resolved = true;
resolve();
}
});
});

let authorizePromise = $state(
Expand All @@ -112,6 +150,10 @@
// Don't authorize if we're only doing an initial handshake
return;
}
// Start the idle timeout after each response is sent.
channel.addEventListener("response", () => {
startIdleTimeout();
});
// Replace promise when channel closes after it was established
channel.addEventListener("close", () => {
authorizePromise = Promise.reject(
Expand Down
18 changes: 18 additions & 0 deletions src/frontend/src/lib/locales/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ msgstr "Methode auswählen"
msgid "Choose method to continue"
msgstr "Methode wählen, um fortzufahren"

msgid "Choose which details you'd like to share"
msgstr ""

msgid "Clear all"
msgstr "Alle löschen"

Expand Down Expand Up @@ -256,6 +259,9 @@ msgstr "Es wurde bestätigt, dass Dashlane inkompatibel ist."
msgid "Default"
msgstr "Standard"

msgid "Deny All"
msgstr ""

msgid "Discoverable passkeys"
msgstr "Auffindbare Passkeys"

Expand All @@ -277,6 +283,9 @@ msgstr "{name} bearbeiten"
msgid "Edit account"
msgstr "Konto bearbeiten"

msgid "Email address"
msgstr ""

msgid "Enable multiple accounts"
msgstr "Mehrere Konten aktivieren"

Expand Down Expand Up @@ -590,6 +599,9 @@ msgstr "Meine Identität"
msgid "n/a"
msgstr "k. A."

msgid "Name"
msgstr ""

msgid "Name account"
msgstr "Konto benennen"

Expand Down Expand Up @@ -767,6 +779,9 @@ msgstr "Zurück zur App"
msgid "Return to application"
msgstr "Zur Anwendung zurückkehren"

msgid "Review Permissions"
msgstr ""

msgid "Right now"
msgstr "Jetzt gerade"

Expand Down Expand Up @@ -1066,6 +1081,9 @@ msgstr "Nutzen Sie ein Gerät mit Ihrer Identität, um die URL zu scannen oder z
msgid "Use existing identity"
msgstr "Bestehende Identität verwenden"

msgid "Verified email"
msgstr ""

msgid "Verify"
msgstr "Überprüfen"

Expand Down
18 changes: 18 additions & 0 deletions src/frontend/src/lib/locales/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ msgstr "Choose method"
msgid "Choose method to continue"
msgstr "Choose method to continue"

msgid "Choose which details you'd like to share"
msgstr "Choose which details you'd like to share"

msgid "Clear all"
msgstr "Clear all"

Expand Down Expand Up @@ -256,6 +259,9 @@ msgstr "Dashlane has been confirmed to be incompatible."
msgid "Default"
msgstr "Default"

msgid "Deny All"
msgstr "Deny All"

msgid "Discoverable passkeys"
msgstr "Discoverable passkeys"

Expand All @@ -277,6 +283,9 @@ msgstr "Edit {name}"
msgid "Edit account"
msgstr "Edit account"

msgid "Email address"
msgstr "Email address"

msgid "Enable multiple accounts"
msgstr "Enable multiple accounts"

Expand Down Expand Up @@ -590,6 +599,9 @@ msgstr "My identity"
msgid "n/a"
msgstr "n/a"

msgid "Name"
msgstr "Name"

msgid "Name account"
msgstr "Name account"

Expand Down Expand Up @@ -767,6 +779,9 @@ msgstr "Return to app"
msgid "Return to application"
msgstr "Return to application"

msgid "Review Permissions"
msgstr "Review Permissions"

msgid "Right now"
msgstr "Right now"

Expand Down Expand Up @@ -1066,6 +1081,9 @@ msgstr "Use a device that already holds your identity to scan or open the URL. T
msgid "Use existing identity"
msgstr "Use existing identity"

msgid "Verified email"
msgstr "Verified email"

msgid "Verify"
msgstr "Verify"

Expand Down
18 changes: 18 additions & 0 deletions src/frontend/src/lib/locales/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ msgstr "Elige un método"
msgid "Choose method to continue"
msgstr "Elige un método para continuar"

msgid "Choose which details you'd like to share"
msgstr ""

msgid "Clear all"
msgstr "Borrar todo"

Expand Down Expand Up @@ -256,6 +259,9 @@ msgstr "Se ha confirmado que Dashlane es incompatible."
msgid "Default"
msgstr "Predeterminada"

msgid "Deny All"
msgstr ""

msgid "Discoverable passkeys"
msgstr "Passkeys detectables"

Expand All @@ -277,6 +283,9 @@ msgstr "Editar {name}"
msgid "Edit account"
msgstr "Editar cuenta"

msgid "Email address"
msgstr ""

msgid "Enable multiple accounts"
msgstr "Activar cuentas múltiples"

Expand Down Expand Up @@ -590,6 +599,9 @@ msgstr "Mi identidad"
msgid "n/a"
msgstr "n/d"

msgid "Name"
msgstr ""

msgid "Name account"
msgstr "Añade una cuenta"

Expand Down Expand Up @@ -767,6 +779,9 @@ msgstr "Volver a la app"
msgid "Return to application"
msgstr "Volver a la aplicación"

msgid "Review Permissions"
msgstr ""

msgid "Right now"
msgstr "Ahora mismo"

Expand Down Expand Up @@ -1066,6 +1081,9 @@ msgstr "Usa un dispositivo que ya tenga tu identidad para escanear o abrir la UR
msgid "Use existing identity"
msgstr "Usar identidad existente"

msgid "Verified email"
msgstr ""

msgid "Verify"
msgstr "Verificar"

Expand Down
18 changes: 18 additions & 0 deletions src/frontend/src/lib/locales/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ msgstr "Choisissez une méthode"
msgid "Choose method to continue"
msgstr "Choisissez une méthode pour continuer"

msgid "Choose which details you'd like to share"
msgstr ""

msgid "Clear all"
msgstr "Tout effacer"

Expand Down Expand Up @@ -256,6 +259,9 @@ msgstr "Il a été confirmé que Dashlane est incompatible."
msgid "Default"
msgstr "Par défaut"

msgid "Deny All"
msgstr ""

msgid "Discoverable passkeys"
msgstr "Passkeys découvrables"

Expand All @@ -277,6 +283,9 @@ msgstr "Modifier {name}"
msgid "Edit account"
msgstr "Modifier le compte"

msgid "Email address"
msgstr ""

msgid "Enable multiple accounts"
msgstr "Activer plusieurs comptes"

Expand Down Expand Up @@ -590,6 +599,9 @@ msgstr "Mon identité"
msgid "n/a"
msgstr "n/d"

msgid "Name"
msgstr ""

msgid "Name account"
msgstr "Nommez le compte"

Expand Down Expand Up @@ -767,6 +779,9 @@ msgstr "Retour à l’application"
msgid "Return to application"
msgstr "Retour à l’application"

msgid "Review Permissions"
msgstr ""

msgid "Right now"
msgstr "À l’instant"

Expand Down Expand Up @@ -1066,6 +1081,9 @@ msgstr "Utilisez un appareil qui contient déjà votre identité pour scanner ou
msgid "Use existing identity"
msgstr "Utiliser une identité existante"

msgid "Verified email"
msgstr ""

msgid "Verify"
msgstr "Vérifier"

Expand Down
18 changes: 18 additions & 0 deletions src/frontend/src/lib/locales/id.po
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ msgstr "Pilih metode"
msgid "Choose method to continue"
msgstr "Pilih metode untuk melanjutkan"

msgid "Choose which details you'd like to share"
msgstr ""

msgid "Clear all"
msgstr "Hapus semua"

Expand Down Expand Up @@ -256,6 +259,9 @@ msgstr "Dashlane telah dikonfirmasi tidak kompatibel."
msgid "Default"
msgstr "Default"

msgid "Deny All"
msgstr ""

msgid "Discoverable passkeys"
msgstr "Passkey yang dapat ditemukan"

Expand All @@ -277,6 +283,9 @@ msgstr "Edit {name}"
msgid "Edit account"
msgstr "Edit akun"

msgid "Email address"
msgstr ""

msgid "Enable multiple accounts"
msgstr "Aktifkan banyak akun"

Expand Down Expand Up @@ -590,6 +599,9 @@ msgstr "Identitas saya"
msgid "n/a"
msgstr "t/a"

msgid "Name"
msgstr ""

msgid "Name account"
msgstr "Beri nama akun"

Expand Down Expand Up @@ -767,6 +779,9 @@ msgstr "Kembali ke aplikasi"
msgid "Return to application"
msgstr "Kembali ke aplikasi"

msgid "Review Permissions"
msgstr ""

msgid "Right now"
msgstr "Saat ini"

Expand Down Expand Up @@ -1066,6 +1081,9 @@ msgstr "Gunakan perangkat yang sudah memiliki identitas Anda untuk memindai atau
msgid "Use existing identity"
msgstr "Gunakan identitas yang ada"

msgid "Verified email"
msgstr ""

msgid "Verify"
msgstr "Verifikasi"

Expand Down
Loading
Loading