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.
Description:
The optional permission functions in the
syncfunction are limited to two arguments:contextanddocumentId. 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:
contextobject for non-Convex Auth providers.