Skip to content

Commit f56a0c1

Browse files
authored
Updated docs for real-time multi-group authorization (#5087)
* Updated docs for real-time multi-group authorization * Update authorization-rules.mdx * fixed typo
1 parent a0e75e2 commit f56a0c1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/pages/cli-legacy/graphql-transformer/auth.mdx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -570,10 +570,6 @@ When `@auth` is used subscriptions have a few subtle behavior differences than q
570570

571571
Alternatively, when the model is protected using the static group auth strategy, the subscription request will only succeed if the user is in an allowed group. Further, the user will only get notifications of updates to records if they are in an allowed group. Note: You don't need to pass the user as an argument in the subscription request, since the resolver will instead check the contents of your JWT token.
572572

573-
<Callout>
574-
Dynamic groups have no impact to subscriptions. You will not get notified of any updates to them.
575-
</Callout>
576-
577573
For example suppose you have the following schema:
578574

579575
```graphql

src/pages/cli/graphql/authorization-rules.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,11 @@ With dynamic group authorization, each record contains an attribute specifying w
210210

211211
By default, `group` authorization leverages Amazon Cognito user pool groups but you can also use OpenID Connect with `group` authorization. See [OpenID Connect as an authorization provider](#using-oidc-authorization-provider).
212212

213-
**Known limitation**: Real-time subscriptions are not supported for dynamic group authorization.
213+
**Known limitations for real-time subscriptions when using dynamic group authorization**:
214+
1. If you authorize based on a single group per record, then subscriptions are only supported if the user is part of 5 or fewer user groups
215+
2. If you authorize via an array of groups (`groups: [String]` example above),
216+
- subscriptions are only supported if the user is part of 20 or fewer groups
217+
- you can only authorize 20 or fewer user groups per record
214218

215219
### Custom authorization rule
216220

0 commit comments

Comments
 (0)