-
Notifications
You must be signed in to change notification settings - Fork 0
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Checking mergeability…
Don’t worry, you can still create the pull request.
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: samananias/printerService
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Could not load branches
Nothing to show
Loading
...
head repository: samananias/printerService
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: auth-security
Could not load branches
Nothing to show
Loading
- 1 commit
- 16 files changed
- 1 contributor
Commits on Sep 4, 2026
-
auth: PIN login gate - one-time login issues in-memory session tokens
- app/services/sessions.py: module-level token set (secrets.token_urlsafe), no persistence - a restart invalidates every token, and since config loads once at startup a PIN change is a restart, so one rule covers both re-prompt triggers - require_pin additively accepts a valid token in X-Session-Token; the raw X-API-PIN header path is unchanged - new GET /auth/status (always 200; pin_required + session_valid true/false/null) and POST /auth/login (401 wrong PIN, 400 when no PIN is configured); router mounted in app/main.py - web: shared gate overlay (GATE_HTML) on both pages styled as a third notebook page, Remember checkbox picks localStorage vs sessionStorage, the old per-action id="pin" field and its JS read sites are gone in favor of one authHeaders() helper, 401 mid-action re-raises the gate, and checkGate() rides the 30 s health poll for restart re-prompt - docs: LOGIN_PLAN.md decision record (review + as-built), WEBDESIGN_PLAN §12 addendum, SOURCE_OF_TRUTH §8/§11, README/.env.example API_PIN text - tests: new unit (sessions, token path of require_pin), API (/auth/status, /auth/login, token-unlocks-route integration) and web gate tests plus an autouse fresh_sessions fixture; suite 316 -> 378, coverage 95.75 %, ruff clean
Loading
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff main...auth-security