docs/docs/auth/authentication/multiple-jwt-secrets.mdx
import HeadingIcon from '@site/src/components/HeadingIcon'; import ProductBadge from '@site/src/components/ProductBadge';
You can configure GraphQL Engine with a list of JWT secrets. This enables you to authenticate with different JWT issuers.
Multiple JWT secrets can be provided in the env var HASURA_GRAPHQL_JWT_SECRETS which takes a list of JWT secret
objects.
For example:
[
{ "jwk_url": "https://...", "issuer": "myapp" },
{ "type": "HS256", "key": "3EK6FD...", "issuer": "test" }
]
The structure of an individual JWT secret is described here.
:::info Note
If both HASURA_GRAPHQL_JWT_SECRET and HASURA_GRAPHQL_JWT_SECRETS are set, then HASURA_GRAPHQL_JWT_SECRETS will be
used.
:::
The authentication is resolved as follows: