Skip to content

docs: update auth signed retry examples#477

Merged
DhruvPareek merged 1 commit into
mainfrom
docs-auth-signed-retry-examples
May 28, 2026
Merged

docs: update auth signed retry examples#477
DhruvPareek merged 1 commit into
mainfrom
docs-auth-signed-retry-examples

Conversation

@DhruvPareek
Copy link
Copy Markdown
Contributor

@DhruvPareek DhruvPareek commented May 19, 2026

Summary

  • Update signed-retry snippets and OpenAPI examples to use Request:<uuid> request IDs.
  • Replace base64/requestId-shaped payloadToSign examples with canonical compact JSON Turnkey activity payloads.
  • Fix the export curl continuation in the wallet export snippet.

Test Plan

  • make build
  • git diff --check
  • Targeted rg scan for stale base64 payloads, bare UUID Request-Id headers, and old signed-retry payload shapes.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 19, 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 May 28, 2026 8:47pm

Request Review

Copy link
Copy Markdown
Contributor Author

DhruvPareek commented May 19, 2026

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 19, 2026

Greptile Summary

This PR updates auth signed-retry documentation examples across MDX snippets and OpenAPI specs, replacing placeholder base64 payloads and bare-UUID request IDs with realistic Turnkey activity JSON payloads and Request:<uuid>-formatted IDs.

  • Updates payloadToSign examples in authentication.mdx, exporting-wallet.mdx, managing-sessions.mdx, and four OpenAPI path/component files from opaque base64 blobs to canonical compact Turnkey activity JSON bodies (e.g., ACTIVITY_TYPE_EXPORT_WALLET, ACTIVITY_TYPE_DELETE_AUTHENTICATORS).
  • Fixes a missing \\ shell line continuation in the first curl call in exporting-wallet.mdx that would have caused the -H flags to be interpreted as a separate shell command.
  • Regenerates the bundled openapi.yaml and mintlify/openapi.yaml via make build to reflect the source changes.

Confidence Score: 5/5

All changes are documentation and example values only — no functional code paths are touched.

Every changed line is an example payload, a header value in a curl snippet, or a shell line-continuation fix. The Turnkey activity JSON examples are internally consistent across MDX snippets and OpenAPI specs, the requestId format is uniformly updated to Request:, and the generated bundles match the source changes. The curl continuation fix in exporting-wallet.mdx corrects a real copy-paste failure that would have broken the example for readers.

No files require special attention.

Important Files Changed

Filename Overview
mintlify/snippets/global-accounts/exporting-wallet.mdx Fixed missing backslash line continuation in first curl call; updated payloadToSign and requestId examples to Turnkey format.
mintlify/snippets/global-accounts/authentication.mdx Updated requestId format note, payloadToSign examples (EMAIL_OTP, PASSKEY) and Request-Id header values to use Request: and Turnkey activity payloads.
mintlify/snippets/global-accounts/managing-sessions.mdx Updated payloadToSign and requestId examples for session revocation to use Turnkey ACTIVITY_TYPE_DELETE_API_KEYS format.
openapi/components/schemas/common/SignedRequestChallenge.yaml Updated payloadToSign example from opaque base64 to generic Turnkey activity JSON placeholder.
openapi/paths/auth/auth_credentials.yaml Updated payloadToSign examples for EMAIL_OTP, OAUTH, and PASSKEY credential challenges to canonical Turnkey activity payloads.
openapi/paths/customers/customers_{customerId}.yaml Updated payloadToSign example for embedded wallet email update challenge to Turnkey ACTIVITY_TYPE_UPDATE_USER_EMAIL format.
openapi/paths/internal_accounts/internal_accounts_{id}.yaml Updated payloadToSign example for internal account update challenge to ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2 Turnkey format.
openapi.yaml Generated bundle — identical diff to mintlify/openapi.yaml, correctly produced by make build from updated source files.
mintlify/openapi.yaml Generated bundle — mirrors changes from openapi/ source files after make build.

Sequence Diagram

sequenceDiagram
    participant C as Client
    participant IB as Integrator Backend
    participant G as Grid API
    participant TK as Turnkey

    IB->>G: "POST /internal-accounts/{id}/export { clientPublicKey }"
    G-->>IB: "202 { payloadToSign (Turnkey JSON), requestId: Request:<uuid>, expiresAt }"
    IB-->>C: "{ payloadToSign, requestId }"
    C->>TK: stamp(payloadToSign, sessionPrivateKey)
    TK-->>C: base64url-encoded stamp
    C->>IB: "{ stamp }"
    IB->>G: "POST /internal-accounts/{id}/export { clientPublicKey } + Grid-Wallet-Signature + Request-Id"
    G-->>IB: "200 { id, encryptedWalletCredentials }"
    IB-->>C: "{ encryptedWalletCredentials }"
    C->>C: decrypt with client private key → mnemonic
Loading

Reviews (3): Last reviewed commit: "docs: update auth signed retry examples" | Re-trigger Greptile

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 19, 2026

✱ Stainless preview builds for grid

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

cli

chore(internal): regenerate SDK with no functional changes

csharp

chore(tests): update PayloadToSign from base64 to JSON in auth credential tests

go

chore(internal): regenerate SDK with no functional changes

kotlin

chore(tests): update payloadToSign format in signed request challenge fixtures

openapi

docs(api): update payloadToSign examples across challenge responses

php

chore(internal): regenerate SDK with no functional changes

python

chore(internal): regenerate SDK with no functional changes

ruby

docs: update auth signed retry examples

typescript

chore(internal): regenerate SDK with no functional changes
⚠️ grid-openapi studio · code

Your SDK build had at least one warning diagnostic.
generate ✅

⚠️ grid-ruby studio · code

Your SDK build had a failure in the lint CI job, which is a regression from the base state.
generate ⚠️build ✅lint ❗test ✅

⚠️ grid-kotlin studio · code

Your SDK build had a failure in the test CI job, which is a regression from the base state.
generate ✅build ✅lint ✅test ❗

⚠️ grid-typescript studio · code

Your SDK build had a failure in the build CI job, which is a regression from the base state.
generate ✅build ❗lint ❗test ❗

⚠️ grid-python studio · code

Your SDK build had at least one warning diagnostic.
generate ✅build ✅lint ✅test ✅

pip install https://pkg.stainless.com/s/grid-python/33e89ddef7a62cb5af2fc2084a5ae008b3a3c260/grid-0.0.1-py3-none-any.whl
⚠️ grid-csharp studio · code

Your SDK build had a failure in the build CI job, which is a regression from the base state.
generate ❗build ❗lint ❗test ❗

⚠️ grid-go studio · code

Your SDK build had a failure in the lint CI job, which is a regression from the base state.
generate ❗build ✅lint ❗test ❗

go get github.com/stainless-sdks/grid-go@836c59cdc57984e577b4ef01d54704f41e1fdbe9
⚠️ grid-php studio · code

Your SDK build had at least one "error" diagnostic.
generate ❗lint ✅test ✅

⚠️ grid-cli studio · code

Your SDK build had a failure in the build CI job, which is a regression from the base state.
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-05-28 21:28:43 UTC

@DhruvPareek DhruvPareek marked this pull request as ready for review May 19, 2026 20:27
@DhruvPareek DhruvPareek marked this pull request as draft May 19, 2026 20:30
@DhruvPareek DhruvPareek changed the base branch from docs-auth-email-account-ids to graphite-base/477 May 19, 2026 20:37
@DhruvPareek DhruvPareek marked this pull request as ready for review May 19, 2026 20:37
@DhruvPareek DhruvPareek requested a review from pengying May 19, 2026 20:37
@DhruvPareek DhruvPareek force-pushed the docs-auth-signed-retry-examples branch from 9f62ede to bd0067a Compare May 19, 2026 20:37
@DhruvPareek DhruvPareek changed the base branch from graphite-base/477 to docs-auth-email-account-ids May 19, 2026 20:37
pengying
pengying previously approved these changes May 19, 2026
@DhruvPareek DhruvPareek changed the base branch from docs-auth-email-account-ids to graphite-base/477 May 26, 2026 21:14
@DhruvPareek DhruvPareek force-pushed the docs-auth-signed-retry-examples branch from 36bc92e to b8de8b4 Compare May 28, 2026 20:45
@graphite-app graphite-app Bot changed the base branch from graphite-base/477 to main May 28, 2026 20:46
@graphite-app graphite-app Bot dismissed pengying’s stale review May 28, 2026 20:46

The base branch was changed.

Show Request:<uuid> request IDs and canonical compact JSON payloadToSign examples for credential add/revoke, wallet export, and session revocation. Also fixes the export curl continuation while updating that snippet.
@DhruvPareek DhruvPareek merged commit 5a69756 into main May 28, 2026
8 of 9 checks passed
@DhruvPareek DhruvPareek deleted the docs-auth-signed-retry-examples branch May 28, 2026 21:20
DhruvPareek added a commit that referenced this pull request May 28, 2026
## Summary

- Update Global Accounts sandbox docs to explain that OAuth no longer uses the fixed `sandbox-valid-oidc-token` value.
- Document the sandbox OIDC token requirements: JWT-shaped token, supported issuer, `aud`/`sub`, fresh `iat`/`exp`, stored `iss`/`aud`/`sub` identity matching, and `nonce = sha256(clientPublicKey)` on verify.
- Clarify that sandbox can use supported-provider ID tokens, while unsigned JWT-shaped tokens are only a sandbox test-token option.
- Update the auth OpenAPI descriptions and rebuild the bundled `openapi.yaml` and `mintlify/openapi.yaml`.

## Stack

- Base docs stack: #476 -> #477 -> #479 -> #481.
- This PR is the first sandbox-auth docs PR on top of that auth cleanup stack.
- Follow-up: #489 adds the sandbox email OTP inbox endpoint docs.

## Context

This matches the Grid behavior from the OIDC auth-method identity stack:

- `dp/grid-oidc-auth-method-identity`
- `dp/grid-realistic-oidc-sandbox`
- `dp/grid-verify-oauth-oidc-identity`

The important customer-facing change is that sandbox no longer accepts a fixed OAuth magic token. It validates the same identity/freshness shape integrators need in production, while still skipping real IdP signature verification in the mock Turnkey path.

## Test Plan

- `npm run lint`
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.

3 participants