feat(waiter): sign-in v2 on the phones (platform-v2 step 4.2)
- Login follows auth.waiter_login_mode / auth.waiter_require_username from the
bootstrap: name + PIN, name + password, typed username, or a "paired screens
only" message for tap mode. POST /api/auth/login {client: "waiter"}; a miss
shows the translated error without a reload.
- POST /api/auth/login-by-id removed; bootstrap login carries waiter_mode and
waiter_require_username.
- Sign-out ends the session on the server (POST /api/auth/logout), so
single_session_waiter = refuse_new no longer strands a waiter.
- Lock on the phone: menu "Lock", automatic lock / sign-out after inactivity
(security.auto_lock*, auto_logout*), unlock with the PIN in the same session,
lock kept across app restarts (restore() no longer clears it).
- e2e: new waiter.mjs (22 checks) in run-all; android.mjs signs in for real and
locks/unlocks on the emulator; TLS live check waits for the socket; the
rediscovery helper re-attaches to a stale WebView handle.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -82,6 +82,10 @@ def _login_info(db: Session) -> dict:
|
||||
from core import sessions
|
||||
return {
|
||||
"manager_mode": sessions.manager_login_mode(db), # password | pin
|
||||
# the waiter app's sign-in (plan 4.2): pin | password | tap (tap = paired screens only:
|
||||
# a phone shows that it can't sign in that way)
|
||||
"waiter_mode": sessions.waiter_login_mode(db),
|
||||
"waiter_require_username": sessions.waiter_requires_username(db),
|
||||
"autofill_username": _setting(db, "security.autofill_username", "true") == "true",
|
||||
"support": bool(cfg.SUPPORT_SECRET and cfg.SITE_ID), # "Support access" is offered
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user