Require clientPubkey in OTP verify flow#437
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
✱ Stainless preview buildsThis PR will update the kotlin openapi python typescript Edit this comment to update them. They will appear in their respective SDK's changelogs. ✅ grid-openapi studio · code · diff
✅ grid-kotlin studio · code · diff
✅ grid-python studio · code · diff
✅ grid-typescript studio · code · diff
This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push. |
Greptile SummaryThis PR makes Confidence Score: 5/5Safe to merge — the schema change accurately reflects what the backend already requires, closing a gap between the documented contract and the actual handler. All three changed files are consistent, the source YAML was edited in the correct location ( No files require special attention.
|
| Filename | Overview |
|---|---|
| openapi/components/schemas/auth/EmailOtpCredentialVerifyRequestFields.yaml | Source schema updated to add clientPublicKey to the required array — correct edit location per repo conventions |
| openapi.yaml | Generated bundle updated with the same clientPublicKey required entry; consistent with the source schema change |
| mintlify/openapi.yaml | Mintlify-specific generated bundle updated identically to openapi.yaml; no issues |
Sequence Diagram
sequenceDiagram
participant Client
participant GridAPI as Grid API
participant Sparkcore
Note over Client,Sparkcore: EMAIL_OTP Verify Flow (after this PR)
Client->>GridAPI: POST /auth/credentials/{id}/verify
Note right of Client: { type: EMAIL_OTP, otp: ...,
Note right of Client: clientPublicKey: ... } now required
GridAPI->>Sparkcore: Forward verify request
Sparkcore-->>GridAPI: Session signing key encrypted with clientPublicKey
GridAPI-->>Client: 200 OK encryptedSessionSigningKey
Note over Client,GridAPI: Before this PR: missing clientPublicKey
Note over Client,GridAPI: passed schema validation but Sparkcore rejected it
Reviews (1): Last reviewed commit: "Require clientPubkey in OTP verify flow" | Re-trigger Greptile
pengying
left a comment
There was a problem hiding this comment.
I think I removed this to mvoe towards providing the clientPublicKey in the challenge step
|
The passkey challenge flow works like you're thinking but not the OTP flow right now |
|
clientPublicKey is reqiured on the verify otp call because EMAIL_OTP challenge does not store clientPublicKey. We can change OTP to store it in a pending otp request but right now with the way it works, clientPublicKey should be required |

Sparkcore handler explicitly requires
clientPublicKeyforEMAIL_OTP's verify flow and rejects the request without it. The grid api hadclientPublicKeyas optional in the verify flow requst body, this makes it required.