Add React hooks for the passkey provider - #463
Draft
Nicolapps wants to merge 1 commit into
Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
This was referenced Aug 13, 2026
Member
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Aug 13, 2026
Nicolapps
force-pushed
the
nicolas/passkey-provider
branch
from
August 13, 2026 21:48
c1ff2a6 to
93db3ba
Compare
Nicolapps
force-pushed
the
nicolas/passkey-react
branch
from
August 13, 2026 21:48
09c5cb1 to
427c004
Compare
This was referenced Aug 13, 2026
commit: |
Nicolapps
force-pushed
the
nicolas/passkey-react
branch
from
August 13, 2026 23:57
427c004 to
eebef3c
Compare
Nicolapps
force-pushed
the
nicolas/passkey-provider
branch
from
August 13, 2026 23:57
93db3ba to
0380fbd
Compare
Nicolapps
force-pushed
the
nicolas/passkey-provider
branch
from
August 14, 2026 15:29
0380fbd to
cee48ec
Compare
Nicolapps
force-pushed
the
nicolas/passkey-react
branch
from
August 14, 2026 15:29
eebef3c to
ae06652
Compare
Nicolapps
force-pushed
the
nicolas/passkey-react
branch
from
August 14, 2026 16:35
ae06652 to
a60f8ab
Compare
Nicolapps
force-pushed
the
nicolas/passkey-provider
branch
from
August 14, 2026 16:35
cee48ec to
c129405
Compare
Nicolapps
force-pushed
the
nicolas/passkey-provider
branch
from
August 14, 2026 16:50
c129405 to
fd20927
Compare
Nicolapps
force-pushed
the
nicolas/passkey-react
branch
from
August 14, 2026 16:50
a60f8ab to
aa1b403
Compare
Nicolapps
force-pushed
the
nicolas/passkey-react
branch
from
August 14, 2026 17:59
aa1b403 to
3d119b7
Compare
Nicolapps
force-pushed
the
nicolas/passkey-provider
branch
from
August 14, 2026 17:59
fd20927 to
0ab1995
Compare
Nicolapps
force-pushed
the
nicolas/passkey-provider
branch
from
August 14, 2026 21:18
0ab1995 to
b1422e0
Compare
Nicolapps
force-pushed
the
nicolas/passkey-react
branch
from
August 14, 2026 21:18
3d119b7 to
62254f3
Compare
Nicolapps
force-pushed
the
nicolas/passkey-provider
branch
from
August 14, 2026 21:19
b1422e0 to
fe871b4
Compare
Nicolapps
force-pushed
the
nicolas/passkey-react
branch
from
August 14, 2026 21:19
62254f3 to
3533c1d
Compare
Nicolapps
force-pushed
the
nicolas/passkey-react
branch
from
August 14, 2026 21:27
3533c1d to
7f3ac86
Compare
Nicolapps
force-pushed
the
nicolas/passkey-provider
branch
from
August 14, 2026 21:28
fe871b4 to
ded2e06
Compare
Nicolapps
force-pushed
the
nicolas/passkey-provider
branch
from
August 14, 2026 22:19
ded2e06 to
cc690f8
Compare
Nicolapps
force-pushed
the
nicolas/passkey-react
branch
from
August 14, 2026 22:19
7f3ac86 to
6af60da
Compare
Nicolapps
force-pushed
the
nicolas/passkey-react
branch
from
August 14, 2026 22:37
6af60da to
d58f533
Compare
Nicolapps
force-pushed
the
nicolas/passkey-provider
branch
from
August 14, 2026 22:37
cc690f8 to
bc26fc7
Compare
- `useSignInWithPasskey`: the identifier-first flow. It asks the backend which ceremony applies, runs the WebAuthn dialog, finishes the ceremony, and adopts the session. - `usePasskeyAutofill`: conditional mediation (passkey autofill). One pending browser request at a time, with an automatic challenge refresh before the 10-minute server TTL. A module-scoped coordinator pauses the pending autofill request while a modal ceremony runs: browsers reject a modal `create()`/`get()` while a conditional request is pending on the same page. Client-side failures fold into the result union as CEREMONY_ABORTED / WEBAUTHN_UNSUPPORTED / OTHER_ERROR, so callers handle every failure through one `userError` switch. Exported at `@convex-dev/auth/providers/passkey/react`. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Nicolapps
force-pushed
the
nicolas/passkey-provider
branch
from
August 14, 2026 23:15
bc26fc7 to
d2f9294
Compare
Nicolapps
force-pushed
the
nicolas/passkey-react
branch
from
August 14, 2026 23:15
d58f533 to
486c809
Compare
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.

Adds the React client for the passkey provider, exported at
@convex-dev/auth/providers/passkey/react. This is the first browser-side WebAuthn code in the repo.useSignInWithPasskey({ startSignIn, finishSignIn, finishSignUp })→{ signIn({ username }), pending }: orchestrates start →credentials.create()/get()→ finish →setSession.usePasskeyAutofill({ startAutofillSignIn, finishSignIn })→{ available, status, lastError, cancel }: keeps a conditional-mediation request pending and refreshes the challenge every ~8 minutes (server TTL is 10). One async loop per effect run, StrictMode-safe by construction; abort reasons (STOP/REFRESH/PAUSE) drive the state machine.setSessionrace is harmless and commented.CEREMONY_ABORTED,WEBAUTHN_UNSUPPORTED,OTHER_ERRORwithcause), extending the password provider'sOTHER_ERRORpattern, so callers handle every failure through oneuserErrorswitch.rawIdas the credential id,pubKeyCredParamsexactly ES256/RS256, discoverable credentials + user verification required.Part 4/5 of the username+passkey provider stack.
Test plan
pnpm typecheck/pnpm lintgreen.🤖 Generated with Claude Code