get-convex / get-convex/prosemirror-sync
Permission Functions in Sync Force Convex Auth Usage
- Dominant language
- TypeScript
- Stars
- 62
- Forks
- 21
- Avg merge
- 5h 25m
- Merged PRs (30d)
- 1
Description
**Description:**
The optional permission functions in the `sync` function are limited to two arguments: `context` and `documentId`. This restriction prevents passing additional arguments, such as a session token, which is necessary when using alternative authentication solutions like Better Auth to verify user identity or permissions (e.g., write access). As a result, developers are forced to use Convex Auth for permission checks, limiting flexibility with other authentication providers.
**Proposed Solution:**
- Extend the permission functions to accept additional arguments, allowing custom data (e.g., session tokens) to be passed.
- Alternatively, provide a mechanism to access authentication-related data in the `context` object for non-Convex Auth providers.
Contributor guide
Assessment
This issue has not been assessed yet.