You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Architecture] Investigate Amazon Code-Based Linking (amazon.<tld>/code) for browserless login #2177
Part of a set of [Architecture] proposals for decoupling Libation's core engine from OS-specific UI/browser dependencies.
Problem
Most of Libation's OS-specific login headaches (WebView20x800700AA, blank login dialogs, libwebkit2gtk 200+ package bloat in Linux/Docker) come from embedding a browser inside the C# GUI process. Meanwhile, the external-browser redirect flow (maplanding) confuses users with "page not found" errors and 2FA intermediate URLs.
Proposal
Investigate Amazon's Code-Based Linking (amazon.<tld>/code, i.e., POST /auth/create/codepair + polling POST /auth/register), as demonstrated in mkb79/Audible#906 (cmd_test-login.py):
User opens https://www.amazon.<tld>/code in any browser and enters a 5-character code while Libation polls for registration completion.
Works identically across CLI, headless/Docker, Web UI, Avalonia, WinForms, and screenreaders.
Experiments needed before committing
Test whether api.amazon.{domain}/auth/create/codepair accepts CurrentAndroid's DeviceType (or only iPhone A2CZJZGLK2JJVM / Fire).
Verify whether Widevine CDM and /1.0/content/{asin}/licenserequest accept CBL-issued bearer + mac_dms tokens without store_authentication_cookie.
Keep the existing redirect-URL flow only as a fallback for legacy pre-amazon (us/uk/de) accounts.
Update from @mkb79 in mkb79/Audible#909 (comment 7031128597): /auth/create/codepair + /auth/register should theoretically work with all device types including Android — testing it in cmd_test-login.py only requires swapping DEVICE_TYPE, REGISTRATION_DATA, and USER_AGENT to Libation's Android profile (untested on Android so far).
Activity
wtanksleyjr commentedon Nov 20, 2026
Update from @mkb79 in mkb79/Audible#909 (comment 7031128597):
/auth/create/codepair+/auth/registershould theoretically work with all device types including Android — testing it in cmd_test-login.py only requires swappingDEVICE_TYPE,REGISTRATION_DATA, andUSER_AGENTto Libation's Android profile (untested on Android so far).