fix(discord): streamline mobile direct auth, polish TV QR pairing, and secure OAuth flow - #592
Merged
ProdigyV21 merged 2 commits intoAug 21, 2026
Conversation
…d secure OAuth flow - Mobile: enable instant direct PKCE browser authentication (0ms delay) by launching OAuth directly instead of waiting on cloud pairing sessions. - Mobile: add dedicated ic_discord vector asset with evenOdd fill type and clean arc tokenization for sharp icon rendering across settings rows. - TV: remove in-app WebView modal and simulated pointer controls in favor of a clean, dedicated QR code pairing card. - TV: remove redundant Cancel button; modal is cleanly centered and dismissable via standard remote Back/Escape keys. - Security: generate independent cryptographically random OAuth state stored under KEY_OAUTH_STATE, and validate state on deep link callback. - Security: extract shared callback logic into callback.js, forward state to arvio:// deep link, and safely construct DOM elements. - UI: move Discord activation panel strings into strings.xml and reference via stringResource. - Docs: update PRIVACY.md to explicitly detail Discord Rich Presence opt-in and revocation rights.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
This pull request overhauls and polishes the Discord Rich Presence authentication and UI flows for both Mobile and Android TV.
1. Mobile Direct Auth (0ms Delay)
auth.arvio.tv/discord/callbacktriggersarvio://discord/auth?code=...&state=...to return directly to the app and finish authentication instantly.ic_discord.xml): Added a clean Discord vector icon usingandroid:fillType="evenOdd"and strict space-separated arc commands, fixing eye-cutout distortion on physical Android devices.2. TV Experience: Pure QR Pairing Card
Back/Escapekeys. Removing the button avoids focus trapping and gives the modal a balanced, centered layout.3. Security & OAuth Hardening
stateVerification: Generated an independent cryptographically random OAuthstatestored underKEY_OAUTH_STATEin private app preferences, distinct from the PKCE code challenge. On deep link return, the callbackstateis compared againstKEY_OAUTH_STATEto protect against CSRF.callback.js): Extracted shared callback logic intocallback.jsto prevent code drift between/discord/callback.htmland/discord/callback/index.html.innerHTMLlink string concatenation with DOM nodes created viadocument.createElement('a')andtextContent.Exceptioninstead ofThrowableinQrCodeImageso critical VM errors (OutOfMemoryError) propagate, with error logging.4. Localization & Documentation
strings.xml.PRIVACY.md): Updated §8 (Your Rights) to explicitly list Discord disconnection alongside Trakt.Verification
netlify-auth-site/testspassed (node --test tests/*.test.js).assembleSideloadDebugsucceeded with zero errors.emulator-5554).