Heath
Heath
CCConvex Community
Created by Heath on 9/12/2024 in #support-community
Setting auth from within an HTTP action
I am using navigator.sendBeacon() to call an HTTP action on page unload, which in turn uses runMutation() to call one of my mutations. This generally works ok, but sendBeacon() cannot be configured to send headers like Authorization. I can pass the JWT via the POST body, but once I receive it within the HTTP action I am not sure how to then configure convex to use this JWT, to somehow call my runMutation with the JWT context, or to otherwise validate the JWT and extract my user information so that my mutation can work properly.
14 replies
CCConvex Community
Created by Heath on 9/6/2024 in #support-community
Auth Callbacks cannot use indexes when making a db.query()
No description
3 replies
CCConvex Community
Created by Heath on 9/3/2024 in #support-community
Rejecting signin for unknown users when using magic link authorization (e.g. Resend)
I am using the Resend magic link w/ Convex Auth, which works fine, but I would like to prevent account creation for users that are not already registered in the database. I looked a bit into how Auth.js handles this. They provide a pre-signIn callback that you can use to reject signin attempts. However, this callback isn't exposed via Convex Auth.
13 replies
CCConvex Community
Created by Heath on 8/21/2024 in #support-community
Setting non-auth client context
Is it possible to set some kind of arbitrary client context that is accessible from all functions, similar to ctx.auth? Something I can specify once on the client side, without having to pass it constantly to every function. Or even literally using the ctx.auth and related features, but without a 3rd party identity provider, just as a vehicle to communicate some client state.
4 replies