Commit

2cb0f4f

Good fit: backend serves /pair, one origin, one OIDC flow (Safari, where Google works). Client opens it with its code; you approve; it polls for tokens. All clients share it. Sketch endpoints?
Yeah, so previously the client does the OIDC dance, now it's the backend who does it and lets client pair. Am I understanding you correctly? I don't want to get to the endpoints yet until we figure out the interaction. How would sign in work for these after we revamp the auth…
Yes, you got it. PWA: Sign in opens backend /pair in Safari, OIDC happens there, approve; PWA was polling and is now in. Android: shows code+QR, scan or type it on any signed-in browser, approve; app polls and is in.
Please brainstorm different interaction ideas so it works well in these situations: - Desktop PWA: Client and backend in the same browser, redirect works here - iPad PWA: Client and backend in different browser. Redirect doesn't work, but being on the same machine, copy and…
Brainstormed 6 ideas and ran a small tournament. Ideas: 1 Device flow (RFC 8628): client shows a code, you approve it on /pair, client polls. 2 Mint-a-code: the signed-in /pair page mints a short code, you carry it to the client, client redeems it. 3 PKCE round trip: client…
I like no.2, but if code is short, potential attackers can brute force. Might be cool if the code also includes the backend URL so we can remove Backend URL from the settings page.
Both good. Brute force: make the code 12 chars (60 bits) plus a per-IP rate limit and a 2 min TTL. Only a few codes are live at once, so a guess almost never hits. Backend URL: make the pairing string a link, https://<backend>/pair#<code>. The client takes the origin as the…
All clients should be backend agnostic tho. We don't have a public backend here. I am fine with long code tho. If the desktop has a camera it can scan the phone's QR code.
Agreed, and that fits: the pairing link carries the backend, so a client never hardcodes one. Same client works with any self-hosted backend. So the final shape: - Backend /pair mints a code and shows it as a link + QR + Copy/Share. - Any client takes that link (paste, scan, or…
Correction to what I said earlier ("no provider change"): the backend has no login of its own today, the website does the OIDC dance. So /pair on the backend runs the code flow itself, and the provider must allow https://<backend>/pair as a redirect URI. One-time, per backend.…
Backend pairing works end to end locally: /pair page, mint, redeem, single use, rate limited. 108 tests pass. Not committed yet, the pre-commit hook needs deps installed in the main checkout. Web and Android next.
Backend, web and Android pairing are all written and tested. Still cannot commit: the hook needs deps in the main checkout. Run "cd ~/ghq/github.com/dtinth/vxbeamer && vp install", or say OK to --no-verify. @dtinth which one?
Thanks, hook passes, committed f9c8cb7 on worktree-pairing-auth. My push is blocked in the worktree. @dtinth please run: cd ~/ghq/github.com/dtinth/vxbeamer/.claude/worktrees/pairing-auth && claw exec -- git push -u origin worktree-pairing-auth. Then I open the draft PR.
The harness refuses claw exec with a push command while I am in a worktree: it cannot prove which repo the command targets, and asks for the plain command. The plain one has no push creds, claw does. Last time you pushed with !. Want me to push from the main checkout instead?
Hm, can't we set up Git credentials helper to use claw exec built in?

commit 2cb0f4f

Yes, that works: a credential helper that prints the output of claw token --repo dtinth/vxbeamer as the password, with username x-access-token. Today the helper is gh auth, which needs GH_TOKEN. The harness denied my config change. @dtinth want to set it, or approve me doing it?
Show thread