Skip to content

Commit 72091ac

Browse files
PiquelChipsclaude
andauthored
feat(auth): recovery and undo links open their pages (#196)
#180 mails recovery links to `/recover#token=…` and undo links to `/recover/undo#recovery=…`, but no page served them: `user recover` even warned that the link "opens a page that is not available yet". An owner also had no way to see a recovery of their account, or to undo it, without asking support. This adds those pages to auth, and asks every session about a recovery that can still be undone. Stacked on #161 (connected apps in settings) in GitHub stack #200: both merge together. ## How - **`/recover`** takes the link's token from the fragment, the way email verification does. It never reads the token on `GET`, since mail scanners open links. - The form's post reads the recovery in-process, then shows the account and what the probation restricts before any passkey is made. - A new `data-passkey-recover` hook runs the ceremony. The token rides in the form's attribute, so the form's own post never sends it again, and a reload is a `GET`. - **`/recover/undo`** works signed out, from the recovery's ID. - It explains what undoing takes back: the recovery's passkey, every device, and every app's access. While the link is unused, undoing only cancels it, and the page says the full undo applies if the link gets used first. - With no passkey from before the recovery, it says only Piquel support can undo it, and offers no button. - A new `data-passkey-undo` hook runs the ceremony with an older passkey. The finish's `signed_in` picks the answer: the settings with a notice, or a page saying the disabled account stays disabled. - Signed in, the page also offers the session's own recovery, but a link's fragment wins. - **"Was this you?"** appears on every settings and developer console page while a recovery can be undone. - "Yes, it was me" hides it for that session and stage, so a "Yes" while the link is unused still asks once it's used. The browser's `localStorage` holds the answer. Without storage, the question shows on every page. - A notice that no answer hides explains the probation up front: until `settles_at`, the recovery's passkey confirms nothing. - A passkey sign-in that continues to an app asks the same question first. Its "continue" link goes on through `/oauth/authorize/resume`, which also returns #180's `unmet_authentication_requirements` to the client. - **The recovery's passkey is never named by its name**, since whoever used the link can rename it. The passkey list marks it "The recovery's passkey" with the time it was added and its ID, and offers no rename. The history uses the same words. No other passkey can be removed until the recovery settles. - **The sign-in step** offers "Sign out" when the browser is signed in, so #180's "Sign out first" answer can be acted on. - **Pages get views, not internals.** The recovery service gains `RecoveryNotice`, a projection that carries no passkey names, read by session (`recovery_notice`) or by ID, signed out (`undoable_recovery`). - **No probation length is written as a number:** the pages read it from `PROBATION` or `settles_at`. ## Tests - **Rust** (`web/recovery/tests.rs`): - the recovery link page: bad token, good token, and the token never re-sent; - the undo page: by ID, open or in probation, with no older passkey, unknown, signed in, and signed in to another account; - the settings frame: the banner's keys per stage and session, the notices, the passkey list's naming, its rename guard and its disabled removals, and the history's hold-back; - the after-sign-in prompt for apps. - **Service:** the two reads (open, probation, settled, unknown, disabled). - **Browser:** `recovery.spec.ts`: 1. Starts a recovery through `E2E_RECOVER`. 2. Uses the link in a second browser. 3. Has the owner undo it from the first browser, after the banner. It's skipped without `E2E_RECOVER`. - **On this PR's preview,** all six browser specs pass, `recovery.spec.ts` included. ## Review - **Claude:** one multi-agent round, with six finders, two verifiers per finding and a critic. All 16 confirmed findings are fixed. Of the 5 plausible ones, the 4 that held up are fixed too. The fifth, a "Yes" in the link holder's session hiding the question from the owner, is handled: the dismissal now also depends on whether a passkey confirmed the session. - **GPT 6.1 Sol:** one round, three findings, all fixed: the undo outcome, a stale cancel page, and the banner without storage. - **After the PR opened,** review-loop ran: two rounds, each with three GPT 6.1 Sol reviewers and one Claude Opus 5.5 reviewer. In round 1 all four approved. One nit is fixed: a hand-made `?remove=` link no longer opens the removal of a passkey that can't be removed. Five nits are declined: - the service keeps its own recovery view, as the visibility audit asked; - the README states the policy's 15 days, and only page text avoids the number; - "a passkey sign-in" is accurate, since linking also needs a passkey; - one extra read on `/login`; - the banner needs scripts, as undoing does. In round 2 all four approved the fix. - **After stacking on #161,** review-loop ran again on both PRs: two rounds, each with three GPT 6.1 Sol reviewers and one Claude Opus 5.5 reviewer, on xhigh. Three fixes: - The banner reads the session through `Owner`: `session_id()` and `was_passkey_confirmed()`, not the repository's `StoredSession`. Three older callers use `Owner::session_id()` too. - The undo's answer decides on `signed_in` alone: an undo that signed the browser in always goes on to the settings. - The probation note says no passkey can be removed when the recovery's passkey is gone, or is the only one. Four suggestions are declined: - the "Added" date on every row; - `lenient_or_default`: a plain bool can't decode the form's text; - a rewrite of the CLI help; - extra assertions on the verify page. In round 2 all four approved. Reviewed with review-loop: 2 rounds with 3× GPT 6.1 Sol and Claude Opus 5.5 on high. Verdict: approved Reviewed again with review-loop after stacking on #161: 2 rounds with 3× GPT 6.1 Sol and Claude Opus 5.5, on xhigh. Verdict: approved > [!NOTE] > Written by Claude Opus 5.5 in Claude Code and reviewed by Claude Opus 5.5 subagents and GPT 6.1 Sol (via T3 Code) 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Recovery pages and flows - Added server-rendered `/recover` and `/recover/undo` pages. The recovery page reads the token from the URL fragment and does not include it in the form post. - Added passkey enrollment through the recovery ceremony. The undo page supports signed-out access and explains what undoing or cancelling a recovery changes. - The undo page offers a passkey ceremony only when the owner has an older passkey available. It reports whether the ceremony signed in the browser. - Added recovery data for open and probation stages, including expiration, settlement, and recovered-passkey details. Recovery lookup now treats missing or no-longer-undoable recoveries as unavailable to the undo flow. ## Recovery notices and sign-in - Added recovery notices to account and settings pages, including the developer console. Notices reflect the recovery stage and session confirmation state, and support dismissal. - Added prompts during qualifying passkey sign-ins to apps. The prompt lets the owner continue authorization or open the undo page. - Sign-in pages now identify an account already signed in to the browser and offer a sign-out option. - Added undo recovery links and stage-specific information to recovery-related page views. ## Passkey settings and history - Settings now identify the passkey added during recovery and show its enrollment time. - Removal is unavailable when it would remove the passkey that the active recovery keeps. Recovery state also updates passkey history descriptions and removal options. - Passkey creation now shares form and ceremony logic across recovery and settings flows. Android-specific passkey-kind selection remains available through the shared form. ## Shared UI and browser behavior - Added shared recovery page, banner, prompt, and form types in `crates/ui`. - Added fragment-based forms for emailed-link tokens and dismissible elements backed by local storage when available. - Updated recovery route registration, page titles, account layout, and architecture documentation. ## Tests - Added Rust integration tests for recovery pages, undo behavior, settings, and app sign-in prompts. These tests require `TEST_DATABASE_URL`. - Added an opt-in browser recovery test. It runs only when `E2E_RECOVER` is set. - The supplied summary reports that the author ran six browser specs on the PR preview. No test-run results are independently available here. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent dcc6497 commit 72091ac

38 files changed

Lines changed: 2399 additions & 350 deletions

‎README.md‎

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ just auth user search ali # by ID, or part of a username, name o
208208
just auth user show alice # recorded, since it shows personal data
209209
just auth user disable alice --reason "Spam"
210210
just auth user enable alice
211-
just auth user recover alice --reason "Lost every passkey" # not usable yet, see below
211+
just auth user recover alice --reason "Lost every passkey"
212212
just auth user recover alice --reason "Phone stolen" --revoke --keep <passkey-id>
213213
just auth user undo-recovery alice --reason "Owner confirmed by phone"
214214
just auth session revoke <session-id> # one session, as `user show` lists it
@@ -235,15 +235,14 @@ just auth account alice emails remove <email-id> --reason "Asked by email"
235235
reads are recorded as views. See
236236
[surfaces.md](docs/architecture/surfaces.md#changing-an-account-on-its-owners-behalf)
237237
for what is shared.
238-
- `user recover` is not usable yet: the page its link opens comes with the
239-
server-rendered pages. It is for an owner who lost every passkey. It signs the
240-
account out everywhere, removes its unverified addresses, and emails its
241-
primary verified address a link that enrolls one passkey, once, within a day;
242-
it prints the link too, for an owner without an address. For 15 days after,
243-
that passkey signs in but confirms no change, and any other passkey of the
244-
account can undo the recovery, which takes back its passkey, every session and
245-
every app consent. Until then, nobody removes a passkey but the recovery's
246-
own.
238+
- `user recover` is for an owner who lost every passkey. It signs the account
239+
out everywhere, removes its unverified addresses, and emails its primary
240+
verified address a link to auth's `/recover`, which enrolls one passkey, once,
241+
within a day; it prints the link too, for an owner without an address. For 15
242+
days after, that passkey signs in but confirms no change, and any other passkey
243+
of the account can undo the recovery, which takes back its passkey, every
244+
session and every app consent. Until then, nobody removes a passkey but the
245+
recovery's own.
247246
- It first lists the account's recoveries of the last 15 days. While one is in
248247
probation, it refuses: find out who used it, and undo it with `user
249248
undo-recovery` first. An unused link is just replaced.
@@ -539,11 +538,11 @@ explains how to choose a requirement and handle the challenge.
539538
identity so another account can link it; account data and credentials never move.
540539
Settings keep listing identities of disabled providers so they can be unlinked.
541540
- The last passkey cannot be removed. Removing a passkey/provider revokes other
542-
central sessions. An owner who lost every passkey is recovered with a link that
543-
enrolls one new passkey; for 15 days after, it confirms no change, and another
544-
passkey of the account can undo the recovery (see
545-
[surfaces.md](docs/architecture/surfaces.md#recovering-an-account)). Until its
546-
page ships, no page uses the link.
541+
central sessions. An owner who lost every passkey is recovered with a link to
542+
auth's `/recover` that enrolls one new passkey; for 15 days after, it confirms
543+
no change, and another passkey of the account can undo the recovery on
544+
`/recover/undo` (see
545+
[surfaces.md](docs/architecture/surfaces.md#recovering-an-account)).
547546
- Sessions last at most 30 days. Access tokens last five minutes. Refresh rotation
548547
detects reuse and stops when its central session expires or is revoked. Ending a
549548
session tells the clients that registered a back-channel logout URI, which end

‎apps/auth-service/assets/passkey.js‎

Lines changed: 118 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,49 @@ class Passkeys {
9595
* @param {PasskeyKind} [kind]
9696
* @returns {Promise<void>}
9797
*/
98-
async register(friendlyName, account, kind = 'standard') {
99-
const path = account ? '/webauthn/register' : '/account/passkeys/enroll';
98+
register(friendlyName, account, kind = 'standard') {
99+
return this.#create(
100+
account ? '/webauthn/register' : '/account/passkeys/enroll',
101+
{ ...account, passkey_kind: kind },
102+
friendlyName
103+
);
104+
}
105+
/**
106+
* Adds a passkey with the recovery link's `token`, which signs the browser in to the
107+
* account it recovers.
108+
* @param {string} token
109+
* @param {string} friendlyName
110+
* @param {PasskeyKind} kind
111+
* @returns {Promise<void>}
112+
*/
113+
recover(token, friendlyName, kind) {
114+
return this.#create('/recovery', { token, passkey_kind: kind }, friendlyName);
115+
}
116+
/**
117+
* Undoes the recovery `recoveryId`, or cancels it when its link was not used, with a
118+
* passkey the account had before it. Signed out, it works on a disabled account too.
119+
* Resolves to whether it signed the browser in, which it does not on a disabled
120+
* account: the session cookie is HttpOnly, so only the answer says.
121+
* @param {string} recoveryId
122+
* @returns {Promise<boolean>}
123+
*/
124+
async undo(recoveryId) {
125+
/** @type {{ signed_in: boolean }} */
126+
const outcome = await this.#assert('/account/recovery/undo', { recovery_id: recoveryId });
127+
return outcome.signed_in;
128+
}
129+
/**
130+
* Runs a creation ceremony against `path`'s start and finish endpoints, starting it with
131+
* `start` and naming the new passkey `friendlyName`.
132+
* @param {string} path
133+
* @param {object} start
134+
* @param {string} friendlyName
135+
* @returns {Promise<void>}
136+
*/
137+
async #create(path, start, friendlyName) {
100138
/** @type {Ceremony<CreationOptions>} */
101-
const start = await this.#post(`${path}/start`, { ...account, passkey_kind: kind });
102-
const options = start.public_key.publicKey;
139+
const ceremony = await this.#post(`${path}/start`, start);
140+
const options = ceremony.public_key.publicKey;
103141
const credential = /** @type {PublicKeyCredential | null} */ (
104142
await navigator.credentials.create({
105143
publicKey: {
@@ -115,7 +153,7 @@ class Passkeys {
115153
if (!credential) throw new Error('Passkey creation was cancelled.');
116154
const response = /** @type {AuthenticatorAttestationResponse} */ (credential.response);
117155
await this.#post(`${path}/finish`, {
118-
ceremony_id: start.ceremony_id,
156+
ceremony_id: ceremony.ceremony_id,
119157
friendly_name: friendlyName,
120158
credential: {
121159
id: credential.id,
@@ -131,10 +169,12 @@ class Passkeys {
131169
});
132170
}
133171
/**
134-
* Runs an assertion ceremony against `path`'s start and finish endpoints.
172+
* Runs an assertion ceremony against `path`'s start and finish endpoints, and
173+
* resolves to the finish's answer.
174+
* @template [T=void]
135175
* @param {string} path
136176
* @param {object} body
137-
* @returns {Promise<void>}
177+
* @returns {Promise<T>}
138178
*/
139179
async #assert(path, body) {
140180
/** @type {Ceremony<RequestOptions>} */
@@ -151,7 +191,7 @@ class Passkeys {
151191
);
152192
if (!credential) throw new Error('Passkey verification was cancelled.');
153193
const response = /** @type {AuthenticatorAssertionResponse} */ (credential.response);
154-
await this.#post(`${path}/finish`, {
194+
return this.#post(`${path}/finish`, {
155195
ceremony_id: start.ceremony_id,
156196
credential: {
157197
id: credential.id,
@@ -255,6 +295,12 @@ class Passkeys {
255295
* `pending_signup`, then posts, so its page sends the browser on.
256296
* - a form marked `data-passkey-enroll` adds a passkey named by its `friendly_name`,
257297
* confirming first if it must, then posts, so its page says so.
298+
* - a form marked `data-passkey-recover` adds a passkey with the recovery link's token,
299+
* its marker's value, named by its `friendly_name` and saved as its `passkey_kind` says,
300+
* then posts, so its page sends the browser on.
301+
* - a form marked `data-passkey-undo` undoes the recovery its marker's value names, with
302+
* a passkey from before it, then posts with its `signed_in` input saying whether the
303+
* undo signed the browser in, so its page says so.
258304
* - a form marked `data-fragment-form` copies the link's fragment into its
259305
* `data-fragment` inputs as it posts, then drops the fragment from the address. It
260306
* shows, with its button enabled, while the link has every value; otherwise the
@@ -265,8 +311,13 @@ class Passkeys {
265311
* - an element marked `data-replace-url` makes its value the page's address: a page
266312
* answering a form with what only it may show, such as a secret, then reloads by
267313
* `GET`, never posting the form again.
268-
* A sign-in, register or enroll form's button starts disabled until passkeys are known
269-
* to work here; its `data-unavailable` note says why, and hides once it is enabled.
314+
* - an element marked `data-dismiss` starts hidden, and shows unless this browser
315+
* dismissed its value, a key; a `data-dismisses` element inside it dismisses its key
316+
* when clicked, hiding it from then on and giving the focus to the page's heading.
317+
* Where the browser keeps no local storage, it shows on every page, and a dismissal
318+
* hides it on that page only.
319+
* A passkey form's button starts disabled until passkeys are known to work here; its
320+
* `data-unavailable` note says why, and hides once it is enabled.
270321
* While a passkey form's ceremony runs, the form is busy: its button is disabled and
271322
* says so, and its `data-passkey-error` element, which says why the last one failed,
272323
* hides.
@@ -368,6 +419,27 @@ function wire(document) {
368419
form.submit();
369420
});
370421
}
422+
if (form.hasAttribute('data-passkey-recover')) {
423+
event.preventDefault();
424+
const data = new FormData(form);
425+
const token = form.dataset.passkeyRecover ?? '';
426+
run(form, async () => {
427+
await passkeys.recover(token, field(data, 'friendly_name') ?? '', kind(data));
428+
form.submit();
429+
});
430+
}
431+
if (form.hasAttribute('data-passkey-undo')) {
432+
event.preventDefault();
433+
const recovery = form.dataset.passkeyUndo ?? '';
434+
const signedIn = /** @type {HTMLInputElement | null} */ (
435+
form.querySelector('input[name="signed_in"]')
436+
);
437+
run(form, async () => {
438+
const outcome = await passkeys.undo(recovery);
439+
if (signedIn) signedIn.value = String(outcome);
440+
form.submit();
441+
});
442+
}
371443
if (form.hasAttribute('data-fragment-form')) {
372444
for (const input of inputs(form))
373445
input.value = fragment().get(input.dataset.fragment ?? '') ?? '';
@@ -387,7 +459,7 @@ function wire(document) {
387459
if (Passkeys.available())
388460
for (const form of /** @type {NodeListOf<HTMLFormElement>} */ (
389461
document.querySelectorAll(
390-
'form[data-passkey-sign-in], form[data-passkey-register], form[data-passkey-enroll]'
462+
'form[data-passkey-sign-in], form[data-passkey-register], form[data-passkey-enroll], form[data-passkey-recover], form[data-passkey-undo]'
391463
)
392464
))
393465
enable(form);
@@ -437,6 +509,41 @@ function wire(document) {
437509
);
438510
});
439511
}
512+
/**
513+
* What `use` reads or writes in this browser's local storage, or `undefined` where
514+
* the browser keeps none or refuses, as when storage is blocked or full.
515+
* @template T
516+
* @param {(storage: Storage) => T} use
517+
* @returns {T | undefined}
518+
*/
519+
const stored = (use) => {
520+
try {
521+
return use(window.localStorage);
522+
} catch {
523+
return undefined;
524+
}
525+
};
526+
for (const element of /** @type {NodeListOf<HTMLElement>} */ (
527+
document.querySelectorAll('[data-dismiss]')
528+
))
529+
element.hidden = Boolean(stored((storage) => storage.getItem(element.dataset.dismiss ?? '')));
530+
for (const button of /** @type {NodeListOf<HTMLElement>} */ (
531+
document.querySelectorAll('[data-dismisses]')
532+
))
533+
button.addEventListener('click', () => {
534+
const key = button.dataset.dismisses ?? '';
535+
const dismissed = /** @type {HTMLElement | null} */ (button.closest('[data-dismiss]'));
536+
if (dismissed?.dataset.dismiss === key) {
537+
// Hiding it takes the focus from the button, so the page's heading gets it.
538+
const heading = document.querySelector('h1');
539+
heading?.setAttribute('tabindex', '-1');
540+
heading?.focus();
541+
dismissed.hidden = true;
542+
}
543+
stored((storage) => {
544+
storage.setItem(key, '1');
545+
});
546+
});
440547
const replaced = /** @type {HTMLElement | null} */ (document.querySelector('[data-replace-url]'))
441548
?.dataset.replaceUrl;
442549
if (replaced) window.history.replaceState(null, '', replaced);

‎apps/auth-service/src/account/mod.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ impl AccountService {
120120
}
121121
}
122122

123-
/// The account as its own pages show it: in their bar, and on the sign-in page's
124-
/// link step.
123+
/// The account as auth's pages show it to the browser signed in to it: in the
124+
/// account's bar, and on the sign-in and undo pages.
125125
pub(crate) struct Profile {
126126
/// Its handle, the login name, which may predate the handle rules.
127127
pub(crate) handle: String,

‎apps/auth-service/src/account/subject.rs‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,18 @@ impl Owner {
127127
self.session.user_id
128128
}
129129

130+
/// The owner's browser session's ID, which a page keys what it remembers per
131+
/// session by.
132+
pub(crate) const fn session_id(&self) -> SessionId {
133+
self.session.id
134+
}
135+
136+
/// Whether a passkey ever confirmed the owner's session. A recovery's passkey
137+
/// never does; a passkey from before it does.
138+
pub(crate) const fn was_passkey_confirmed(&self) -> bool {
139+
self.session.passkey_confirmed_at.is_some()
140+
}
141+
130142
/// The owner's browser session, as the request found it.
131143
pub(crate) const fn session(&self) -> &StoredSession {
132144
&self.session

‎apps/auth-service/src/cli/user.rs‎

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,18 @@ pub(super) enum UserCommand {
4949
/// The account: its username, ID or verified email.
5050
user: UserRef,
5151
},
52-
/// Recover an account whose owner lost every passkey (not usable yet).
52+
/// Recover an account whose owner lost every passkey.
5353
///
54-
/// The recovery page its link opens comes with the server-rendered pages.
55-
/// First lists the account's recoveries of the last 15 days. Refuses while
56-
/// one is in probation: find out who used it, and undo it with `user
57-
/// undo-recovery` first. An unused link is replaced. Refuses an
58-
/// administrator's account: revoke its rights first. Ends the account's
59-
/// sessions, removes its unverified addresses, and sends its primary verified
60-
/// address a link that enrolls one passkey, within a day; prints the link
61-
/// too, for when there is none. For 15 days after, that passkey signs in but
62-
/// confirms no change, and any older passkey can undo the recovery. Needs
63-
/// `AUTH_PUBLIC_BASE_URL` and the token digest key, which derives the link.
54+
/// First lists the account's recoveries that started, ended or were used
55+
/// within a probation's length. Refuses while one is in probation: find out
56+
/// who used it, and undo it with `user undo-recovery` first. An unused link
57+
/// is replaced. Refuses an administrator's account: revoke its rights first.
58+
/// Ends the account's sessions, removes its unverified addresses, and sends
59+
/// its primary verified address a link that enrolls one passkey, within a
60+
/// day; prints the link too, for when there is none. Through the probation
61+
/// that follows, that passkey signs in but confirms no change, and any older
62+
/// passkey can undo the recovery. Needs `AUTH_PUBLIC_BASE_URL` and the token
63+
/// digest key, which derives the link.
6464
Recover {
6565
/// The account: its username, ID or verified email.
6666
user: UserRef,
@@ -169,9 +169,6 @@ impl UserCommand {
169169
{
170170
println!("{link}");
171171
}
172-
eprintln!(
173-
"The link opens a page that is not available yet; it works once, for a day."
174-
);
175172
}
176173
Self::UndoRecovery {
177174
user,

‎apps/auth-service/src/federation/identities.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ impl AccountService {
162162
if evidence.link_user_id != Some(user)
163163
|| evidence
164164
.link_session_id
165-
.is_some_and(|id| id != owner.session().id)
165+
.is_some_and(|id| id != owner.session_id())
166166
{
167167
return Err(FederationError::LinkAccountMismatch.into());
168168
}

‎apps/auth-service/src/history/mod.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ impl AccountService {
195195
tx.revoke_sessions(
196196
&context,
197197
owner.user(),
198-
SessionScope::AllExcept(owner.session().id),
198+
SessionScope::AllExcept(owner.session_id()),
199199
&RevocationReason::CompromiseReported,
200200
)
201201
.await?;

‎apps/auth-service/src/passkey/mod.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ impl PasskeyApplication {
782782
} = app
783783
.consume::<EnrollmentCeremony>(&headers, input.ceremony_id)
784784
.await?;
785-
if user_id != owner.user() || session_id != owner.session().id {
785+
if user_id != owner.user() || session_id != owner.session_id() {
786786
return Err(PasskeyError::SessionChanged.into());
787787
}
788788
let key = app

0 commit comments

Comments
 (0)