Repository navigation
Connect: a link naming a book ends on it, and skips the exchange when already signed in - #108
Merged
Merged
Conversation
… already signed in
The link's book and user ride on PairingScan (route params and a pasted link alike), useLinkPairing.pair takes one argument and skips the exchange when already signed in (reading the connections again after a failed session read), endConnect is the flow's one ending, and signedInAs is built on priorConnection.
The skip asks GET /me on the connection's own address first, so a stored token the server has revoked falls through to the exchange (an unreachable server still opens the book); a screen left while the session is read again spends nothing; Add someone keeps the exchange, which switches to that person; the paste path shows progress and clears the last error.
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.
Pairs with KodeStar/audiosilo-server#144 (server#137, Listen in player).
/web/connect(and a pasted link) may carrybook(a library id),pathanduid, now onPairingScan. The destination is rebuilt withbookHref, never followed as a URL.uidonsid(signedInAs):GET /meon the connection's own address; OK -> open the book, no exchange (no second session, no new-device notice). 401 -> exchange as usual. Add someone never skips.finishConnectends on the book. Both end throughendConnect, so kids mode still wins.bookbehaves exactly as before; native never receives these links.Gates: tsc, lint, prettier, jest (407 suites, 4868 tests). Verified in a real browser against the paired server branch (see the server PR).