Add /settings web editor for the encrypted addon config #9
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/web-settings-editor"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
A place to change a family member's account settings (addon URLs + TMDB key) from any browser instead of typing them on a TV — the ask being "manage my parents' settings without their Windows PC having the app installed." It also doubles as the per-user config-update tool: the onboarding template is a one-time seed, so this is how you edit a live account's config.
How
pb_public/settings.html— a login → decrypt → edit → re-encrypt flow, all client-side against the existing collection API (no new server logic):auth-with-password→ token + user record (nsfwEnabled); the password is kept only in-memory.addon_config(collection rules already scope toprofile.user).addon_config_crypto.dartand the onboarding page).Two design points that matter
PBKDF2(password, salt); an already-logged-in device caches that key and has no password on a restored session. Reusing the salt keeps the key identical, so the edited blob decrypts on the TV with no re-entry. Minting a fresh salt (like signup does) would make the TV unable to decrypt and nag the user to re-enter addons on the TV — the exact thing we're avoiding.nsfwEnabled. The adult addon URL + enable toggle render only for an 18+ account; a clean account never sees them, and their stored values are carried through untouched on save (mirrors the app's non-adult-device behavior).pb_hooks/settings.pb.js— a/settings→/settings.htmlredirect for a clean URL.Testing
/settingswith the test account — log in, edit, save, and confirm the app picks up the change.🤖 Generated with Claude Code