fix(auth): pin the Ring deeplink back to cookie, which is all v1.19 can parse (#321) - #322
Merged
Merged
Conversation
…an parse (#321) #296 moved the deeplink to grant auth. No Ring release can authorize it: v1.19's APK ships the pre-0.10 `libpubkycore.so` — md5 af6af18…, 9,718,912 bytes, byte-identical to the binary react-native-pubky#39 replaced — whose parser knows the intent hosts "", `signin` and `signup` and answers `signin_grant` with "Unrecognized format". The npm package is fine, so the stale library comes from Ring's release build; filed as pubky/pubky-ring#375. Measured back to back on emulator-5554, both URLs minted by the FFI: the cookie URL raises Ring's "Select Pubky" prompt, the grant URL does not reach it. That also corrects #296's own record, which had the cookie control failing too — it does not reproduce, so the grant switch is what broke Ring sign-in, not v1.19 alone. Only the flow binding and the signup intent host move. #296's other two fixes stay: `requireSessionSecretShape` accepts both secret shapes by prefix family, and `SessionPayloadParser`'s `grant_secret` alias is inert under cookie auth. Grant is still the destination — the cookie flow is deprecated upstream — so #321 tracks reverting this, and the KDoc says revert rather than rebuild. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WkPJoKxLJnigyfL6eKfPFW
… a device The 2026-09-10 entry recorded a freshly minted cookie URL as rejected by Ring v1.19 and concluded it broke sign-in either way. That row does not reproduce: re-run on emulator-5554, the cookie URL raises Ring's approval prompt and only the grant URL fails. The wrong row is what sent two sessions looking for a Ring parser bug instead of a stale binary. Records what the pin does and does not fix: Ring's half passes, and the round trip is still blocked by the relay resolution failure inside the app process — which the pin makes terminal, since fork#7's resume is grant-only and pubky 0.10's cookie flow has no `restore` to rebuild it from. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WkPJoKxLJnigyfL6eKfPFW
Sign-in completes on a device: mint, Ring prompt, approval, session. The emulator's relay resolution failure stands as an environment blocker, not a result of the pin. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WkPJoKxLJnigyfL6eKfPFW
Owner
Author
|
Round trip confirmed — sign-in completes end to end on the pinned build (maintainer's device, 2026-09-13): mint → Ring prompt → approval → session. Journey 01 updated to PASS. The emulator-5554 failure described above stands as an environment blocker (that process's resolver losing |
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.
Sign-in with Pubky Ring has been broken since #296. The cause is not in that PR's logic — it is
that no Ring release can parse the grant deeplink it mints — but the fix is here, because Ring
cannot ship on our schedule.
Pins
startAuthFlow/awaitAuthApprovaland the signup intent host back to the cookie variants.Everything else #296 landed stays.
What was actually wrong
Ring v1.19's APK carries
lib/arm64-v8a/libpubkycore.soat md5af6af1809d6e6767b82b51c3a00c2584, 9,718,912 bytes — byte-identical to the pre-0.10 binarythat react-native-pubky#39 replaced (
9718912 -> 10651088). Nosignin_grantstring, noparse_deep_linksymbol; the parser is the 0.9.1 one, which accepts the intent hosts"",signinandsignupand returnsInvalid auth URL intent 'signin_grant'for anything else.The npm package is fine —
@synonymdev/react-native-pubky@0.14.0ships md589709ec8…,10,651,088 bytes, three
signin_granthits — so v1.19 was built against a stale cache. Filed aspubky/pubky-ring#375. Nothing is pending upstream:
v1.19..origin/mainis one unrelated commitand no Ring PR or issue touches deeplink parsing.
The control that had been recorded wrong
#296 and
journeys/RESULTS.mdboth say a freshly minted cookie URL is rejected by v1.19 too,and conclude v1.19 breaks sign-in either way. It does not reproduce. Back to back on
emulator-5554, same minute, both URLs minted by our own FFI in a scratch:shared:jvmTestandsent with
adb shell am start -a android.intent.action.VIEW -d '<url>' to.pubky.ring:pubkyauth://signin?caps=…&relay=…&secret=…pubkyauth://signin_grant?…&cid=loopky.app&cpk=…[InputRouter] Unknown input formatThat row is why two sessions went looking for a Ring parser bug rather than a stale binary, so it
is corrected in
RESULTS.mdrather than quietly overwritten.Verified on a device
With this build installed, Loopky mints
pubkyauth://signin?…(logcat) and Ring raises theapproval prompt — the step that was impossible on grant.
The round trip still does not complete on the emulator, and not because of this change. The
relay long-poll fails inside the app process with the resolution failure already recorded on
2026-09-10: attempt 1 dies after a ~20s lookup timeout, attempts 2 and 3 instantly, and pubky's
poller gives up after three. Other Loopky traffic succeeds the same second and
ping httprelay.pubky.appfrom the device shell answers, so it is this process's resolver. Survived areboot, an IPv4-only network and a resolver bounce.
One real cost, stated rather than buried: the resume that rides such an outage out (fork#7 /
#298) is
await_grant_auth_approvalonly. pubky 0.10's cookie flow exposes nosave_local/restoreto rebuild it from, soawait_cookie_auth_approvaldies on the first outage. Building acookie resume against a pin meant to be short-lived is not worth it — but it means a flaky network
now breaks Ring sign-in where it recovered before, and it is the second reason to lift the pin
promptly.
Undoing it
#321 lists the five places to revert, and
PubkyClient.startAuthFlow's KDoc says revert ratherthan rebuild. Gate: a Ring APK whose
libpubkycore.sohashes to the npm package's../gradlew detektAll :shared:jvmTest :cli:test lintSwiftgreen;:androidApp:assembleDebugbuiltand driven on
emulator-5554.🤖 Generated with Claude Code
https://claude.ai/code/session_01WkPJoKxLJnigyfL6eKfPFW