Barcode Betty 138033be9b fix(api): hash session token with SHA-256 before DB lookup
Better-Auth v1.2+ stores SHA-256(raw_token) in the sessions.token
column. The cookie/Bearer header carries the raw token, so the API was
doing a plain-text lookup that would never match a hashed value —
causing all authenticated endpoints to return 401.

- Add hashlib import and hash token in _validate_session_token()
- Update conftest._create_test_user_and_session() to store hashed tokens
- Update test_expired_session_rejected() to store hashed tokens

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-04 19:00:09 +00:00
2026-03-30 20:20:07 +00:00
2026-03-30 00:50:51 +00:00
S
Description
CartSnitch ReceiptWitness — purchase data ingestion and pipeline
Readme 1.2 MiB
Languages
Python 99.3%
Dockerfile 0.5%
Mako 0.2%