Plugin: drop auth.py and the PyJWT dependency #12

Closed
opened 2026-08-09 20:31:47 +00:00 by hermes · 1 comment
Owner

Context

Plugin rework (see #18). The plugin currently has a full Apple auth stack
(auth.py: ES256 signing + localhost MusicKit OAuth + credential cache).
After the gateway exists, none of it belongs on the beets host.

Task

In /opt/data/git/git.sams.wtf/coop/beets-appleplaylists (already cloned):

  1. Delete beetsplug/appleplaylists/auth.py.
  2. Remove PyJWT from pyproject.toml dependencies (and from the lockfile
    via uv lock).
  3. Remove the auth imports/usage from beetsplug/appleplaylists/__init__.py
    — but note _sync/_backfill still call AppleAuthManager; complete
    this only together with #13/#14 (they are one logical change; do them in
    the same working session).
  4. The MusicKit JS login HTML from auth.py is needed by the gateway —
    it is preserved in git history and referenced by gateway issue #5; no
    copy needs to live in the plugin.

Acceptance criteria

  • auth.py gone; PyJWT absent from pyproject.toml and uv.lock.
  • uv run pytest green after #13/#14 land.
## Context Plugin rework (see #18). The plugin currently has a full Apple auth stack (`auth.py`: ES256 signing + localhost MusicKit OAuth + credential cache). After the gateway exists, none of it belongs on the beets host. ## Task In `/opt/data/git/git.sams.wtf/coop/beets-appleplaylists` (already cloned): 1. Delete `beetsplug/appleplaylists/auth.py`. 2. Remove `PyJWT` from `pyproject.toml` dependencies (and from the lockfile via `uv lock`). 3. Remove the auth imports/usage from `beetsplug/appleplaylists/__init__.py` — but note `_sync`/`_backfill` still call `AppleAuthManager`; complete this only together with #13/#14 (they are one logical change; do them in the same working session). 4. The MusicKit JS login HTML from `auth.py` is needed by the gateway — it is preserved in git history and referenced by gateway issue #5; no copy needs to live in the plugin. ## Acceptance criteria - `auth.py` gone; `PyJWT` absent from `pyproject.toml` and `uv.lock`. - `uv run pytest` green after #13/#14 land.
Author
Owner

Implemented in coop/beets-appleplaylists commit b5a121c8c728bcf218e5e4561bed603e01e82b44:

  • deleted beetsplug/appleplaylists/auth.py;
  • removed PyJWT from pyproject.toml and regenerated uv.lock;
  • removed the old auth imports and credential dance from the plugin.

Verification: uv run pytest -q -> 21 passed; uv lock --check passed.

Implemented in `coop/beets-appleplaylists` commit `b5a121c8c728bcf218e5e4561bed603e01e82b44`: - deleted `beetsplug/appleplaylists/auth.py`; - removed `PyJWT` from `pyproject.toml` and regenerated `uv.lock`; - removed the old auth imports and credential dance from the plugin. Verification: `uv run pytest -q` -> 21 passed; `uv lock --check` passed.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
coop/beets-appleplaylists#12
No description provided.