John
CCConvex Community
•Created by John on 2/6/2024 in #support-community
{"code":"BadJsonBody","message":"Failed to buffer the request body: length limit exceeded"}
I'm currently trying to use the stable diffusion image-to-image api to generate images and save them to Convex storage.
I initially tried using a Nextjs API route to call the api, and then call a Convex action to store each generated image. The issue is that the API returns images as base64 encoded strings. When I try to pass the string to the Convex action, some images will throw the following error and not get stored (seems like the image strings are too long):
I then tried creating a Convex action to make the API request directly in an action and store the images. However, if I try to generate and store more than ~3 images in a single request, calling the action from the client throws the following error:
The images get stored successfully, but because of the timeout, I'm not getting the return data to display.
Any suggestions for a better way to set this up?
6 replies
CCConvex Community
•Created by John on 2/1/2024 in #support-community
WorkOS Authkit as Custom Auth Integration with Convex
Currently having some trouble figuring out how to use WorkOS Authkit as Custom Auth with Convex.
- there doesn't seem to be an equivalent of an
AuthProviderXReactProvider
- not sure how to update the useAuthFromProviderX
reference to use with ConvexProviderWithAuth
so that ctx.auth.getUserIdentity()
works correctly
- not sure what to provide as the domain
and applicationID
in the auth.config.js
file
I've tried referencing this next-authkit-example, the convex clerk example, and the nextauth example by Web Dev Cody, but still not sure how to get it working with convex.
The WorkOS docs mention that:
In order to persist the authenticated state of the user in the application, we need to store and access a session. WorkOS User Management does not currently offer a session management feature, this must instead be handled by the application. For illustration purposes we’ll be using a JSON Web Token (JWT) to store the authenticated user in a short lived cookie, though your approach may differ depending on the application's specific requirements.Which seems to refer to this file in their example. Not sure if that affects the setup for Convex.
7 replies