Repository navigation
Console: Listen in player opens the book in the web player, signed in - #144
Merged
Merged
Conversation
…player, signed in
A narrow PairToken for the two fields the console reads of POST /auth/pair, playerConnectUrl takes the token, the user and the book, and the button ignores clicks while its token is on its way.
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.
Closes #137.
The admin book page gains Listen in player (beside Match, only with the
web_playercapability). A click opens a tab synchronously (so no pop-up block), mints a one-time token with the existingPOST /auth/pair, and points the tab at the same-origin/web/connect?token=&sid=&uid=&book=&path=(never the payload'sweb_url, which may be another origin). If the call fails the tab closes and a toast says why; one token per click.No Go change. Pairs with KodeStar/audiosilo-frontend (feat/listen-in-player), which reads
book/path/uid: already signed in as that user it opens the book without an exchange (after aGET /mecheck, so a revoked token falls through to the exchange), else it pairs and ends on the book./webships with the server, so the two land together.Verification
Known: a skipped exchange leaves that click's single-use token unspent until it expires (10 minutes). Pairing tokens are never pruned from
tokens(pre-existing); worth a small retention job later.Docs: KodeStar/audiosilo-docs (docs/listen-in-player).