mirror of
https://github.com/graphql-hive/console
synced 2026-05-22 08:38:27 +00:00
Fix \resolveUserFn\ typo authorization-authentication.mdx (#6093)
This commit is contained in:
parent
8554e2f62b
commit
fcecd08bfc
1 changed files with 2 additions and 3 deletions
|
|
@ -629,7 +629,7 @@ export const gatewayConfig = defineConfig({
|
|||
// Then set generic auth plugin to use granular mode
|
||||
mode: 'protect-granular',
|
||||
// Set where to extract the payload
|
||||
resolveUser: ctx => ctx.jwt?.payload,
|
||||
resolveUserFn: ctx => ctx.jwt?.payload,
|
||||
// If you want to continue execution even if some fields are rejected
|
||||
rejectUnauthenticated: false
|
||||
}
|
||||
|
|
@ -674,11 +674,10 @@ this behavior by providing a custom `extractScopes` function.
|
|||
|
||||
```ts
|
||||
{
|
||||
resolveUserFn,
|
||||
validateUser,
|
||||
mode: 'protect-granular',
|
||||
// Set where to extract the payload
|
||||
resolveUser: ctx => ctx.jwt?.payload,
|
||||
resolveUserFn: ctx => ctx.jwt?.payload,
|
||||
extractScopes: jwtPayload => jwtPayload?.scopes // Expected to return an array of strings
|
||||
}
|
||||
```
|
||||
|
|
|
|||
Loading…
Reference in a new issue