hermes-agent/tests/plugins/platforms/photon
Ray Sun 37561c214b fix(photon): use allowlisted device client_id + validate token before save
Photon now allowlists registered device clients on the device-code
endpoint; the old client_id "hermes-agent" is rejected with
400 invalid_client, breaking the entire login flow. Switch to Photon's
published "photon-cli" device client and send the standard scope.

Also validate the device-flow token against /api/auth/get-session and
/api/projects/ before persisting it, and extract token candidates from
every response shape Photon has used (access_token, accessToken,
data.*, set-auth-token header) so a token that authenticates the
session lookup but is rejected by the project API fails loudly at
login instead of 404ing downstream.

Verified live: request_device_code() now returns 200 + a valid
user_code where "hermes-agent" returned 400 invalid_client.

Salvaged from #34467 by @yanxue06.
2026-06-08 15:52:33 -07:00
..
test_auth.py fix(photon): use allowlisted device client_id + validate token before save 2026-06-08 15:52:33 -07:00
test_inbound.py chore(photon): clean up ty type-checker warnings from lint-diff bot 2026-06-08 13:38:30 -07:00
test_mention_gating.py feat(photon): group-chat mention gating for full channel parity 2026-06-08 13:38:30 -07:00
test_outbound_media.py feat(photon): wire outbound media via spectrum-ts attachment() (#42397) 2026-06-08 15:29:16 -07:00
test_signature.py feat(gateway): add Photon Spectrum (iMessage) platform plugin 2026-06-08 13:38:30 -07:00