Align auth session request-id contract#445
Align auth session request-id contract#445DhruvPareek wants to merge 1 commit intoauth-v2-credential-create-contractfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
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. |
✱ 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-python studio · code · diff
✅ grid-kotlin studio · code · diff
✅ grid-typescript studio · code · diff
✅ grid-openapi studio · code · diff
This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push. |
29cb640 to
892050e
Compare
84b8352 to
998bd62
Compare
892050e to
ba21425
Compare
998bd62 to
0ecc793
Compare
0ecc793 to
4032687
Compare
4032687 to
cbebbc5
Compare
Greptile SummaryThis PR narrows the PASSKEY credential description in the
Confidence Score: 3/5The endpoint prose and the The
|
| Filename | Overview |
|---|---|
| openapi/paths/auth/auth_credentials_{id}_verify.yaml | Endpoint description updated to remove POST /auth/credentials as a PASSKEY challenge source and clarify clientPublicKey is bound at the challenge step, but the Request-Id header parameter description still references the old dual-source wording, leaving an internal contradiction. |
| openapi.yaml | Generated bundle updated via make build to reflect the source YAML change; carries the same inconsistency between the endpoint description and the Request-Id parameter description. |
| mintlify/openapi.yaml | Mintlify bundle updated identically to openapi.yaml; same inconsistency applies. |
Sequence Diagram
sequenceDiagram
participant Client
participant Grid
Note over Client,Grid: PASSKEY auth flow (after this PR)
Client->>Grid: "POST /auth/credentials/{id}/challenge (clientPublicKey bound here)"
Grid-->>Client: "{ challenge, requestId }"
Client->>Client: navigator.credentials.get(challenge)
Client->>Grid: "POST /auth/credentials/{id}/verify Request-Id: {requestId} body: { type: PASSKEY, assertion }"
Grid-->>Client: "{ encryptedSessionSigningKey, expiresAt }"
Note over Client,Grid: EMAIL_OTP / OAUTH flow (unchanged)
Client->>Grid: "POST /auth/credentials/{id}/verify body: { type, otp/oidcToken, clientPublicKey }"
Grid-->>Client: "{ encryptedSessionSigningKey, expiresAt }"
Comments Outside Diff (1)
-
openapi/paths/auth/auth_credentials_{id}_verify.yaml, line 45-49 (link)Request-Idparameter description contradicts updated endpoint descriptionThe
Request-Idheader parameter description (lines 45–48) still says therequestIdcan come fromPOST /auth/credentialsORPOST /auth/credentials/{id}/challenge, but the updated endpoint description now only listsPOST /auth/credentials/{id}/challengeas the challenge source forPASSKEYcredentials. A developer reading both sections will get contradictory signals about which endpoints can produce a validrequestIdto echo here.Prompt To Fix With AI
This is a comment left during a code review. Path: openapi/paths/auth/auth_credentials_{id}_verify.yaml Line: 45-49 Comment: **`Request-Id` parameter description contradicts updated endpoint description** The `Request-Id` header parameter description (lines 45–48) still says the `requestId` can come from `POST /auth/credentials` OR `POST /auth/credentials/{id}/challenge`, but the updated endpoint description now only lists `POST /auth/credentials/{id}/challenge` as the challenge source for `PASSKEY` credentials. A developer reading both sections will get contradictory signals about which endpoints can produce a valid `requestId` to echo here. How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
openapi/paths/auth/auth_credentials_{id}_verify.yaml:45-49
**`Request-Id` parameter description contradicts updated endpoint description**
The `Request-Id` header parameter description (lines 45–48) still says the `requestId` can come from `POST /auth/credentials` OR `POST /auth/credentials/{id}/challenge`, but the updated endpoint description now only lists `POST /auth/credentials/{id}/challenge` as the challenge source for `PASSKEY` credentials. A developer reading both sections will get contradictory signals about which endpoints can produce a valid `requestId` to echo here.
```suggestion
description: >-
The `requestId` returned alongside the Grid-issued `challenge` from
`POST /auth/credentials/{id}/challenge`, echoed back here so Grid
can correlate the assertion with the pending challenge. Required
when `type` is `PASSKEY`; ignored for `EMAIL_OTP` and `OAUTH`.
```
Reviews (1): Last reviewed commit: "Align auth session request-id contract" | Re-trigger Greptile
ba21425 to
330eaf5
Compare
cbebbc5 to
014a693
Compare
014a693 to
a60c666
Compare
330eaf5 to
14337ea
Compare
a60c666 to
f25ca4f
Compare

Uh oh!
There was an error while loading. Please reload this page.