aws-amplify / aws-amplify/docs
[gen2 docs] Subscribe demo stops working with Implement per-user authorization
- Dominant language
- MDX
- Stars
- 506
- Forks
- 1.1k
- Avg merge
- 3h 14m
- Merged PRs (30d)
- 1
Description
**Describe the content issue**:
Hello. When following [9. Implement per-user authorization](https://docs.amplify.aws/nextjs/start/quickstart/nextjs-app-router-client-components/#9-implement-per-user-authorization) the subscription never updates the items once they are added using the allow.owner() below. If you refresh the page, the items show, so they have definitely been added to the data store.
```
}).authorization(allow => [allow.owner()]),
```
If you change it to the below, the subscription works.
```
.authorization((allow) => [allow.authenticated()])
```
I am not sure what needs to be added/fixed to get this to work but the example in the documentation seems broken.
(https://github.com/aws-amplify/docs/blob/main/src/pages/%5Bplatform%5D/start/quickstart/nextjs-pages-router/index.mdx)
Contributor guide
Research direction
Start with the linked authorization section and compare it with src/pages/[platform]/start/quickstart/nextjs-pages-router/index.mdx. Reproduce the owner-authorized subscription flow, then verify the documentation or example is corrected when newly added items appear without a page refresh.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, graphql, next.js
- Domain
- authorization, documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100