Skip to content
MUI’s hosted AI Assistant backend shuts down at the end of 2026.Switch in two lines →
  • Products
    • AG Grid AI Toolkit Early accessThe model and the server behind the toolkit.
    • MUI X Data Grid StableThe backend for the Premium AI Assistant.
    • TanStack Table Public alphaA plugin that applies each answer to your table.
    • AG Studio Early accessA hosted backend for its assistant, not built yet.
  • How it works
  • Accuracy
  • Pricing
  • Security
  • Docs
    • Quickstart: server route
    • Quickstart: TanStack Table
    • Browser keys
    • Moving from MUI’s hosted service
    • Guide: when MUI’s service retires
Sign inStart a 7-day trial
Menu
  • Products
    • AG Grid AI Toolkit Early access
    • MUI X Data Grid Stable
    • TanStack Table Public alpha
    • AG Studio Early access
  • How it works
  • Accuracy
  • Pricing
  • Security
  • Docs
    • Quickstart: server route
    • Quickstart: TanStack Table
    • Browser keys
    • Moving from MUI’s hosted service
    • Guide: when MUI’s service retires
  • Sign in

Product

  • How it works
  • Accuracy
  • Pricing
  • Data and security

Grids

  • AG Grid AI ToolkitEarly access
  • MUI X Data Grid PremiumStable
  • TanStack TablePublic alpha
  • AG StudioEarly access

Docs

  • Quickstart: server route
  • Browser keys
  • Guide: when MUI’s service retires

Company

  • Contact
  • Terms
  • Privacy

Not affiliated with or endorsed by MUI or AG Grid. MUI and AG Grid are trademarks of their respective owners.

© 2026 Gridsay

Docs pages
Start
  • Documentation
  • How it works
  • Examples
MUI X Data Grid
  • Quickstart: server route
  • From the browser
  • Using the helper
  • Filtering
  • Sorting
  • Grouping
  • Aggregation
  • Pivoting
  • Charts
  • Row selection
  • Follow-up questions
  • Refusals and errors
  • Moving from MUI’s service
  • Reference
TanStack Table
  • Quickstart
  • Describing columns
  • Filtering
  • Sorting
  • Grouping
  • Row selection
  • Server-side data
  • Controlled state
  • Undo and reset
  • Refusals and errors
  • API reference
Keys and sign-in
  • Secret and publishable keys
  • Browser keys
  • JWT and OIDC
  • Session tokens
  • Identity webhook
  • Per-user limits
  • The console
  • Data and privacy
HTTP API
  • HTTP API
  • Authentication
  • Data Grid endpoint
  • Follow-up questions
  • Private mode
Reference
  • Errors
  • Limits
  • Tiers and credits
  • @gridsay/core
On this page

On this page

  1. What you configure
  2. Which claims are read
  3. What is checked on every question
  4. When a check fails
  5. Next
Skip to the article
Start
  • Documentation
  • How it works
  • Examples
MUI X Data Grid
  • Quickstart: server route
  • From the browser
  • Using the helper
  • Filtering
  • Sorting
  • Grouping
  • Aggregation
  • Pivoting
  • Charts
  • Row selection
  • Follow-up questions
  • Refusals and errors
  • Moving from MUI’s service
  • Reference
TanStack Table
  • Quickstart
  • Describing columns
  • Filtering
  • Sorting
  • Grouping
  • Row selection
  • Server-side data
  • Controlled state
  • Undo and reset
  • Refusals and errors
  • API reference
Keys and sign-in
  • Secret and publishable keys
  • Browser keys
  • JWT and OIDC
  • Session tokens
  • Identity webhook
  • Per-user limits
  • The console
  • Data and privacy
HTTP API
  • HTTP API
  • Authentication
  • Data Grid endpoint
  • Follow-up questions
  • Private mode
Reference
  • Errors
  • Limits
  • Tiers and credits
  • @gridsay/core

JWT and OIDC

On this page

  1. What you configure
  2. Which claims are read
  3. What is checked on every question
  4. When a check fails
  5. Next

If your sign-in provider already gives users a signed token (a JWT), your page sends that token with each question and Gridsay checks it. Nothing runs on your server. This is the JWT / OIDC method on a publishable key.

What you configure#

Open Auth and limits, choose the publishable key, set Method to JWT / OIDC, fill in the fields, and choose Save authentication.

FieldWhat to enter
ProviderWhat to enterFills in an example and says where to find each value for Clerk, Auth0, Supabase, Firebase, Amazon Cognito, Microsoft Entra ID, Okta, WorkOS or Better Auth. Nothing from it is saved; use Other for anything else
SignatureWhat to enterWhere the keys that sign your tokens come from: Issuer (OIDC discovery), JWKS URL, or Shared secret (HS256)
Issuer URLWhat to enterWith discovery: your provider's https issuer. Gridsay reads its discovery document, whose issuer must equal this value exactly
JWKS URLWhat to enterWith a JWKS URL: the https address that publishes your provider's public signing keys
Issuer (optional)What to enterWith a JWKS URL or a shared secret: when set, the token's iss must equal it exactly
AudienceWhat to enterRequired with discovery or a JWKS URL; optional with a shared secret. The token's aud must contain it. Up to 255 characters
User id claimWhat to enterThe claim that holds your user's id. sub by default; dots reach nested claims, as in user.id. Up to 100 characters
Shared secretWhat to enterWith HS256 only: after saving the method, choose Set secret and enter the secret your server signs tokens with, 32 to 8,192 characters. It is stored encrypted and never shown again. Replace secret swaps it at once: tokens signed with the old one stop working

Several providers issue tokens with no audience by default. The Provider hints say how to add one, for example with a JWT template in Clerk or WorkOS.

Which claims are read#

A decoded token Gridsay accepts looks like this:

JSON
{  "iss": "https://auth.example.com",  "aud": "gridsay",  "sub": "user_123",  "exp": 1796241600,  "plan": "pro",  "ai_quota": 300}
  • iss must equal your issuer, when you set one.
  • aud must contain your audience, when you set one.
  • exp is required. A token is accepted up to 60 seconds after it expires, to allow for clock differences, and nbf is honoured when present.
  • Your User id claim must hold a non-empty string of at most 255 characters. It is the user every limit counts.
  • Every claim, including your own such as plan or ai_quota, can be matched by limit rules.

What is checked on every question#

  1. The question comes from one of the key's allowed origins.
  2. The key has a saved method.
  3. The Authorization header is Bearer followed by the token.
  4. The signature is valid. Tokens signed with a provider's keys may use RS256, RS384, RS512, ES256, ES384, EdDSA or PS256; shared-secret tokens use HS256 only.
  5. iss, aud, exp and nbf pass, and the user id claim is there.
  6. Your limits allow the question.

With discovery, Gridsay reads /.well-known/openid-configuration under your issuer to find the signing keys. Signing keys are fetched from your provider and kept for ten minutes. A token whose kid names a key not seen yet makes Gridsay fetch them again, at most once a minute. Your discovery and JWKS addresses must be public https addresses that answer within three seconds, with no redirect, and with at most 256 KiB.

The page code from the console sends the token for you; getToken is your function that returns it:

TSX
'use client'; import { createPromptResolver } from '@gridsay/mui-x-data-grid';import {  DataGridPremium,  GridAiAssistantPanel,  useGridApiRef,} from '@mui/x-data-grid-premium';import { useMemo } from 'react'; // Inside your client component, using your own rows and columns:const apiRef = useGridApiRef();const onPrompt = useMemo(  () =>    createPromptResolver({      url: 'https://api.gridsay.com/api/v1/datagrid/prompt',      publishableKey: 'pk_gs_FAKE_EXAMPLE_DO_NOT_USE',      // Your end user's token, sent as Authorization: Bearer.      getToken: () => getToken(),      apiRef,    }),  [apiRef],); <DataGridPremium  apiRef={apiRef}  rows={rows}  columns={columns}  aiAssistant  onPrompt={onPrompt}  slots={{ aiAssistantPanel: GridAiAssistantPanel }}  showToolbar/>

When a check fails#

Status and codeWhat your user seesWhy
401 unauthenticated_userWhat your user seesSign in to use the assistant.WhyNo Authorization header; or not Bearer and a token; or a bad signature, wrong algorithm, wrong iss or aud, or an expired token; or no valid user id
503 upstream_unavailableWhat your user seesThe assistant is temporarily unavailable. Try again.WhyYour discovery or JWKS address did not answer as above, its issuer did not match, or a shared secret was never saved
429 rate_limitedWhat your user seesToo many attempts. Try again in N seconds.WhyMore than 20 failed checks in a minute for this key from one client address. Successful checks and provider outages do not count
403 forbiddenWhat your user seesThe assistant is not available right now.WhyNo method is saved on the key

The response's detail tells you which case it is, for example:

JSON
{  "ok": false,  "statusCode": 401,  "code": "unauthenticated_user",  "message": "Sign in to use the assistant.",  "detail": "End-user credential could not be verified. Send a fresh credential matching the issuer, audience and verification settings at /app/auth."}

None of these is charged. They are listed under Refusals on Usage, not under Requests.

Next#

  • Session tokens
  • Identity webhook
  • Per-user limits