Skip to content

Commit

Permalink
Update jwt.mdx (#3415)
Browse files Browse the repository at this point in the history
Fix examples
  • Loading branch information
GreenmeisterDavid authored Aug 21, 2024
1 parent fee3f0c commit 1ea798f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions website/src/pages/docs/features/jwt.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const yoga = createYoga({
]
// Configure where to look for the JWT token: in the headers, or cookies.
// By default, the plugin will look for the token in the 'authorization' header only.
lookupLocations: [
tokenLookupLocations: [
extractFromHeader({ name: 'authorization', prefix: 'Bearer' }),
],
// Configure your token issuers/audience/algorithms verification options.
Expand All @@ -79,7 +79,7 @@ const yoga = createYoga({
},
// Configure context injection after the token is verified.
// By default, the plugin will inject the token's payload into the context into the `jwt` field.
// You can pass an object: `{ fieldName: "myJwt" }` to change the field name.
// You can pass a string: `"myJwt"` to change the field name.
extendContext: true,
// The plugin can reject the request if the token is missing or invalid (doesn't pass JWT `verify` flow).
// By default, the plugin will reject the request if the token is missing or invalid.
Expand Down

0 comments on commit 1ea798f

Please sign in to comment.