Skip to content

feat: add PASSKEY branch to additional-credential challenge flow#365

Draft
DhruvPareek wants to merge 1 commit into04-21-feat_add_passkey_branch_to_auth_credential_verifyfrom
04-21-feat_add_passkey_branch_to_additional-credential_challenge_flow
Draft

feat: add PASSKEY branch to additional-credential challenge flow#365
DhruvPareek wants to merge 1 commit into04-21-feat_add_passkey_branch_to_auth_credential_verifyfrom
04-21-feat_add_passkey_branch_to_additional-credential_challenge_flow

Conversation

@DhruvPareek
Copy link
Copy Markdown
Contributor

Adds the PASSKEY branch to AuthCredentialAdditionalChallengeOneOf, letting platforms register a second (or third, etc.) passkey credential on an internal account that already has one. Completes the "add another credential" challenge/retry pattern for passkeys, matching the EMAIL_OTP and OAUTH flows already in the stack.

Flow

  1. POST /auth/credentials with { type: "PASSKEY", accountId, nickname, challenge, attestation } on an account that already has a credential.
  2. Response is 202 with { type: "PASSKEY", payloadToSign, requestId, expiresAt }.
  3. Client signs payloadToSign with the session private key of an existing verified credential on the same internal account and retries the request with Grid-Wallet-Signature + Request-Id headers.
  4. Signed retry returns 201 with the created AuthMethod.

Schemas added

  • PasskeyCredentialAdditionalChallengeFields{ type: "PASSKEY" } (variant single-value enum on type; no per-type extra fields, same shape as the OAUTH variant).
  • PasskeyCredentialAdditionalChallengeallOf(AuthCredentialAdditionalChallenge, PasskeyCredentialAdditionalChallengeFields); wire shape is { type, payloadToSign, requestId, expiresAt } (signing fields inherited from the base).

Wire-up

  • AuthCredentialAdditionalChallengeOneOf.yaml discriminator map extended with PASSKEY → PasskeyCredentialAdditionalChallenge.
  • PASSKEY example added to the 202 response on POST /auth/credentials.
  • .stainless/stainless.yml registers the two new schemas under auth.credentials.

Notes

  • Multiple passkey credentials per internal account are allowed (no PASSKEY_CREDENTIAL_ALREADY_EXISTS); this PR documents the concrete wire shape Grid returns when the client hits that branch.
  • Final PR in the PASSKEY sub-stack on top of the OAUTH stack; together with the two prior PASSKEY PRs it covers create, verify, and additional-credential registration.
  • Bundled openapi.yaml and mintlify/openapi.yaml regenerated via make build.

Adds the PASSKEY branch to `AuthCredentialAdditionalChallengeOneOf`, letting platforms register a second (or third, etc.) passkey credential on an internal account that already has one. Completes the "add another credential" challenge/retry pattern for passkeys, matching the EMAIL_OTP and OAUTH flows already in the stack.

**Flow**
1. `POST /auth/credentials` with `{ type: "PASSKEY", accountId, nickname, challenge, attestation }` on an account that already has a credential.
2. Response is 202 with `{ type: "PASSKEY", payloadToSign, requestId, expiresAt }`.
3. Client signs `payloadToSign` with the session private key of an existing verified credential on the same internal account and retries the request with `Grid-Wallet-Signature` + `Request-Id` headers.
4. Signed retry returns 201 with the created `AuthMethod`.

**Schemas added**
- `PasskeyCredentialAdditionalChallengeFields` — `{ type: "PASSKEY" }` (variant single-value enum on `type`; no per-type extra fields, same shape as the OAUTH variant).
- `PasskeyCredentialAdditionalChallenge` — `allOf(AuthCredentialAdditionalChallenge, PasskeyCredentialAdditionalChallengeFields)`; wire shape is `{ type, payloadToSign, requestId, expiresAt }` (signing fields inherited from the base).

**Wire-up**
- `AuthCredentialAdditionalChallengeOneOf.yaml` discriminator map extended with `PASSKEY → PasskeyCredentialAdditionalChallenge`.
- PASSKEY example added to the 202 response on `POST /auth/credentials`.
- `.stainless/stainless.yml` registers the two new schemas under `auth.credentials`.

**Notes**
- Multiple passkey credentials per internal account are allowed (no `PASSKEY_CREDENTIAL_ALREADY_EXISTS`); this PR documents the concrete wire shape Grid returns when the client hits that branch.
- Final PR in the PASSKEY sub-stack on top of the OAUTH stack; together with the two prior PASSKEY PRs it covers create, verify, and additional-credential registration.
- Bundled `openapi.yaml` and `mintlify/openapi.yaml` regenerated via `make build`.
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
grid-flow-builder Ready Ready Preview, Comment Apr 22, 2026 4:43am

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 22, 2026

✱ Stainless preview builds

This PR will update the grid SDKs with the following commit messages.

kotlin

chore(internal): regenerate SDK with no functional changes

openapi

feat(api): add passkey credential type to auth additional challenges

python

chore(internal): regenerate SDK with no functional changes

typescript

chore(internal): regenerate SDK with no functional changes

Edit this comment to update them. They will appear in their respective SDK's changelogs.

grid-openapi studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅

grid-typescript studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ✅test ✅

npm install https://pkg.stainless.com/s/grid-typescript/b1fb9edbcc33fb5a7b9e2db1d995dad06f7b64f5/dist.tar.gz
grid-python studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ✅test ✅

pip install https://pkg.stainless.com/s/grid-python/9186ad48eb786b6cf6b72af246b8393caaf24bef/grid-0.0.1-py3-none-any.whl
grid-kotlin studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ✅test ✅


This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push.
If you push custom code to the preview branch, re-run this workflow to update the comment.
Last updated: 2026-04-22 04:48:51 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant