Last.fm auth: mobile sessions and the desktop token flow
CI / lint (push) Successful in 9s
CI / test (push) Successful in 25s
CI / notify (push) Successful in 5s

- auth.getMobileSession (username + password), auth.getToken and
  auth.getSession with Last.fm error codes 4/14/15
- /api/auth/ redirects clients' approval links to the web UI's
  approve page; /api/v1/tokens lets the UI show and approve a token
- Tokens expire after an hour, are single use and bound to their app
- The legacy md5 authToken form is deliberately unsupported (it needs
  unsalted password hashes)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mattandClaude Opus 5.5 committed 2026-09-25 14:01:12 +01:00
1 parent e026e56ee3
commit 7622f7433a
8 files changed
+292 -3

No files matched your search

+11
View File
@@ -56,3 +56,14 @@ class SessionSchema(Schema):
dump_only=True, attribute="api_app.name", metadata={"example": "Pano Scrobbler"}
)
created_at = fields.DateTime(dump_only=True)
class AuthTokenInfoSchema(Schema):
app_name = fields.String(
dump_only=True, attribute="api_app.name", metadata={"example": "Pano Scrobbler"}
)
approved = fields.Boolean(dump_only=True)
class ApproveTokenSchema(Schema):
token = fields.String(required=True, metadata={"description": "Token from auth.getToken"})