web: Ask for the passkey on every sign-in

Signing out only ended the app's session: the next sign-in went
through the provider's still-valid session without a prompt, so
signing out seemed to do nothing. Sign-ins now ask the provider to
authenticate afresh and check the token's auth_time, as passkey
confirmations already do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jackos1998andClaude Opus 5.5 committed 2026-11-23 12:31:23 +00:00
1 parent 538a288182
commit 652e80961a
3 files changed
+27 -15

No files matched your search

+3 -1
View File
@@ -173,7 +173,9 @@ tested with, and the [demo](demo.md) runs it.
- **Signing in.** The broker is an OIDC client (`web.clientId`, the `openidconnect` crate, with
PKCE), checking the ID token itself rather than trusting a header from the proxy. Only members of
`web.group` may sign in: the provider should restrict the client to that group, and the broker
checks the token's `groups` claim too.
checks the token's `groups` claim too. Every sign-in asks the provider to authenticate afresh
(`max_age=0`) and checks the token's `auth_time`, so signing out of the app means the next
sign-in needs the passkey, even while the provider's own session lasts.
- **Sessions.** A sign-in gives a session cookie (`tower-sessions`) that lasts seven days without
use. Sessions are kept in an SQLite database in the broker's state directory, so a restart
doesn't sign phones out.