Repository navigation
Conversation
Settings > Phone & devices gains Account in the desktop app: Continue with GitHub or Apple opens the system browser, the account service sends it back to a server on 127.0.0.1 that the app runs for that one sign-in (RFC 8252, the code in the query), and the page finishes the sign-in with the PKCE verifier it kept. Signed in, it lists the account's PCs and offers Sign out. The app names the account service with OVIS_ACCOUNT_SERVICE_URL (https only); with none, nothing changes. Only the server's own pages get the bridge, and the app opens only the account service's own address. (cherry picked from commit cba57492caae8169d11240e31b772d811215f7dd)
… Apple An in-app OvisAuth plugin carries the sign-in: on iOS, GitHub opens in an ASWebAuthenticationSession and Sign in with Apple runs natively (no name or email asked), its identity token going to the apple_id_token grant with the raw nonce whose SHA-256 Apple signed; on Android, both open in the browser and come back to ovis://account/callback through an intent filter. The page finishes the sign-in itself, as in a browser; the plugin keeps no token. The connect screen offers Sign in to your account, opening the hosted shell's front page, only in a build made with OVIS_APP_ACCOUNT=1. The iOS app gains the Sign in with Apple entitlement. (cherry picked from commit a67163254e6856580e87b4e66ef1d131630836f7)
…, on desktop, Android and in the page
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Review findings before opening, and how they were resolved (1fdeed7)Codex (gpt-6.1-terra, xhigh, adversarial):
Not reproduced by the reviewer: a different-origin page using the bridge, the open handler opening a non-account-service address, a random injected code redeeming (PKCE). |
# Conflicts: # src/lib/account/account.test.ts
# Conflicts: # app/electron/src/main.ts
Deploying ovis with
|
| Latest commit: |
f815e39
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d66e87cb.ovis.pages.dev |
| Branch Preview URL: | https://feat-account-native.ovis.pages.dev |
…ce keeps (#2867) Stacked on #2858 (sign-in from the desktop and phone apps). ## What - **docs/guide.md**, under On your phone: **Through an account**. Signing in is optional; QR pairings move into the account by themselves the next time each PC opens; a PC marked **Needs approval** is joined by comparing digits; a device already in the account approves a new one by picking its number out of three, and one approval reaches every PC. Who gets into a PC is still decided by that PC alone, where **Revoke** always works. - **Privacy policy** (ovis.sh/privacy, English and Korean): **Your account**, saying what the account service at `account.ovis.sh` stores (a random account id, the provider and a hash of its id for you, token hashes, the PC list with each PC's name, relay id, public key and relay, signed add/remove records for at most 30 days, join requests with the device's name and public key for 10 minutes) and what it never receives (what you type, what PCs show, files, the digits you compare, private keys); and the account service in the list of what the app connects to. ## Validation - `bun run check fast` at b30f255: ok (typecheck, build, unit tests); `scripts/ovis-site.test.ts`, `scripts/ovis-site-platform.test.ts` pass. - Docs only: no behaviour change, so no new tests.
|
Landed as part of #2867 (the whole account stack was merged there in one squash). |
Stacked on #2856 (account devices). Title says "needs owner OK": it adds the Sign in with Apple entitlement to the iOS app and a new URL scheme route on Android.
What
Signing in to the account outside a browser tab (docs/account.md, "Signing in"):
app/electron): Settings > Phone & devices gains Account (sign in with GitHub or Apple, the account's PCs, Sign out). Sign-in opens the system browser; the account service sends it back to a server onhttp://127.0.0.1:<port>/callbackthat the app runs for that one sign-in (RFC 8252, code and state in the query). The page finishes the sign-in with the PKCE verifier it kept. Only the server's own pages get the bridge (ovisAccount, checked by sender frame in main), the app opens only the account service's own origin, and the listener takes only the return naming the state of the sign-in it opened, with a code or an error; anything else is turned away and the wait goes on. The account service is named withOVIS_ACCOUNT_SERVICE_URL(https only); with none, nothing changes.OvisAuthPlugin.swift): GitHub (and Apple on the web flow) in anASWebAuthenticationSessionreturning toovis://account/callback; Sign in with Apple natively, asking for no name and no email, its identity token sent to theapple_id_tokengrant with the raw nonce whose SHA-256 Apple signed.OvisAuthPlugin.java, manifest intent filter): both providers in the browser, back toovis://account/callback. Another app can send that address too, so only the return naming the waiting sign-in's state, with a code or an error, is taken. A replaced or failed call is released.src/lib/account/native.ts,desktop.ts,finishOwnSignIn): a return naming another sign-in's state is refused before anything is consumed, and the sign-in just started is dropped.app/web): Sign in to your account opens the hosted shell's front page, only in a build made withOVIS_APP_ACCOUNT=1.Owner steps (before a store build ships this)
sh.ovis.app: https://developer.apple.com/account/resources/identifiers/list (opensh.ovis.app, tick Sign In with Apple, Save).Depends on
connect-src; that change is in the contract branch below (server/static.ts). Until it lands, the desktop sign-in's token exchange is blocked by the policy.Tests
app/electron/src/accountSignIn.test.ts: the callback with the expected state is handed back and the listener stops; other paths, a missing code, or another state are turned away while it keeps waiting; two starts at once leave one sign-in, and a new one replaces the old.src/lib/account/account.test.ts: an older sign-in's return is refused in place of the one just started, and drops it.Validation
bun run check fastat 81896d5: ok (typecheck, build, unit tests).app/electron:bun run typecheck,bun test src.app/electron/src/children.test.ts"startServer ... stops it" fails about 1 run in 4 on this machine without this PR's changes (exitedcomes back null).