New — Iris AI drafts your firewall, routing & rate-limit rules. Explore AI features →
Changelog
Security

Custom fields in the signed token

Pick which of your users' metadata keys your app receives in the token ngris signs, under custom, next to their ID and roles.

Your app already gets a token signed by ngris with every request from a signed-in user: who they are, their email, their roles. Now it can also carry the values you keep on each user, such as their tenant, plan or employee ID, so your app trusts them the same way.

What's new

  • In the signed token, under Sign-in & access › Your app › User metadata: add the metadata keys the token should carry. In the API it is token_fields in the endpoint's forwarding_config, and the MCP server's registration policy tools take it too.
  • A custom claim. The token carries those keys with the values you set on the user, for example "custom": {"tenant": "acme", "seats": 12}. A user without any of the keys gets no custom claim, so treat a missing key as unknown and refuse rather than fall back to a default.
  • Whole values, never cut. Up to 20 keys and 1 KB in all. A key that doesn't fit is left out whole, so your app never reads half a value.
  • See it before you save. The decoded token on the same page shows each user's custom claim as your app will receive it.

Get started

  1. Set metadata on your users (dashboard, API, CLI or MCP).
  2. Open the endpoint's Sign-in & access › Your app and add keys under In the signed token. Save.
  3. In your app, read custom from the token you already verify.
  4. Read the docs: The signed token.

Read the docs

Ask an AI to summarise this page
Deploy
App hosting Edge functions Domains & certificates
Connect
Secure tunnels API gateway Multi-region edge
Protect
Bot protection & challenge WAF & firewall Edge login
Observe & AI
Monitoring Inspector & replay Iris AI MCP server AI Gateway
Developers
Developer tools Docs ngrok policy converter Blog Changelog
Compare
Ngris vs ngrok Ngris vs Cloudflare Tunnel Ngris vs Vercel Ngris vs Netlify Expose localhost guide
More
Solutions Pricing Enterprise Sign in Get Started Free