feat: centralize ARVIO Cloud authentication via auth.arvio.tv#472
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 571e27889b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (hash.includes("access_token=") && hash.includes("refresh_token=")) { | ||
| try { | ||
| const params = new URLSearchParams(hash.replace(/^#/, "")); | ||
| const access_token = params.get("access_token"); | ||
| const refresh_token = params.get("refresh_token"); |
There was a problem hiding this comment.
Require state before accepting auth hash tokens
Because this effect runs on any app load and trusts any URL hash containing access_token and refresh_token, a crafted link such as https://web.arvio.tv/#access_token=<attacker-token>&refresh_token=<attacker-refresh> will silently save that session and log the victim into the attacker's ARVIO Cloud account, causing profile/watch-history/settings sync to go to the wrong account. The callback should only accept tokens when they match a pending auth request state/nonce that was generated before redirecting to the auth portal and echoed back.
Useful? React with 👍 / 👎.
571e278 to
399c954
Compare
Centralizes ARVIO Cloud authentication on auth.arvio.tv. This enables Single Sign-On (SSO) login flow for both the web app and TV pairing client flow, simplifying configurations and future integrations.