The Ente server validates the auth token as URL-safe base64 with padding (matching Go's base64.URLEncoding). Our toBase64URL strips padding, producing a 43-char token where the server expects 44. This caused HTTP 401 'invalid token' on every authenticated call. Adds toBase64URLPadded to the crypto module and uses it in unwrapAuth for the token specifically. toBase64URL (no-padding) is kept for general use (JWT-style contexts). Adds test/integration/live-login.ts which logs into the dev account (entedev2026jp@acidhou.se), unwraps keys, and fetches collections from the real Ente API. Verified: 4 collections returned successfully.
9.3 KiB
9.3 KiB