feat: add approver-side Pubky Auth FFI#83
Conversation
bindings/android/lib/src/main/kotlin/com/synonym/bitkitcore/bitkitcore.common.kt
Outdated
Show resolved
Hide resolved
bindings/android/lib/src/main/kotlin/com/synonym/bitkitcore/bitkitcore.common.kt
Show resolved
Hide resolved
|
@ben-kaufman pls "fix" merge conflicts, can just ask claude that PR #81 got merged meanwhile, and it should figure out what's causing the merge conflicts (hint: the cargo fmt applied to all rust files), can't be that hard to reformat the code before or after these changes). I usually ask it to make a backup branch (with "-backup" suffix), then reapply our PR's changes on top of default branch, then double-check nothing got lost in the process, commit, bumpm version, regenerate bindngs, check if we should update CHANGELOG.md, push, delete and recreate release on latest commit (if created), and update PR description as needed if applicable (for example, when I have release linked or something). so far I keep repeating all this every time xD, should make an automation one day though. |
ovitrif
left a comment
There was a problem hiding this comment.
LGTM, just needs new bindings after conflicts are resolved
|
Approved — code is clean and consistent with existing patterns. A few nits/observations for consideration (none blocking): Nits
What's good
|
Add approve_pubky_auth and parse_pubky_auth_url to enable approving auth requests from other apps. Bump version and regenerate bindings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the raw string kind field with a proper PubkyAuthKind enum (Signin/Signup) for type safety in generated bindings. Bump version and regenerate bindings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
b723c97 to
47cac66
Compare
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
|
Looks like the update is just a rebase + rustfmt — the nits from our earlier comments are still open. They're all non-blocking, but the |
ovitrif
left a comment
There was a problem hiding this comment.
utACK — code is clean and follows existing conventions. Nits noted in comments.
Summary
approve_pubky_auth(auth_url, secret_key_hex)— signs an AuthToken and POSTs it to the relay, enabling approval of auth requests from other appsparse_pubky_auth_url(auth_url)— parses apubkyauth://URL into aPubkyAuthDetailsrecord for UI display (kind, capabilities, relay, homeserver, signup_token)Test plan
cargo test -- pubky— all 42 tests passcargo build— compiles cleanlyapprovePubkyAuthandparsePubkyAuthUrlappear in generated Swift/Kotlin bindings🤖 Generated with Claude Code