Skip to content

Commit 1ea798f

Browse files
Update jwt.mdx (#3415)
Fix examples
1 parent fee3f0c commit 1ea798f

File tree

1 file changed

+2
-2
lines changed
  • website/src/pages/docs/features

1 file changed

+2
-2
lines changed

website/src/pages/docs/features/jwt.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const yoga = createYoga({
6666
]
6767
// Configure where to look for the JWT token: in the headers, or cookies.
6868
// By default, the plugin will look for the token in the 'authorization' header only.
69-
lookupLocations: [
69+
tokenLookupLocations: [
7070
extractFromHeader({ name: 'authorization', prefix: 'Bearer' }),
7171
],
7272
// Configure your token issuers/audience/algorithms verification options.
@@ -79,7 +79,7 @@ const yoga = createYoga({
7979
},
8080
// Configure context injection after the token is verified.
8181
// By default, the plugin will inject the token's payload into the context into the `jwt` field.
82-
// You can pass an object: `{ fieldName: "myJwt" }` to change the field name.
82+
// You can pass a string: `"myJwt"` to change the field name.
8383
extendContext: true,
8484
// The plugin can reject the request if the token is missing or invalid (doesn't pass JWT `verify` flow).
8585
// By default, the plugin will reject the request if the token is missing or invalid.

0 commit comments

Comments
 (0)