Kevin
Kevin
Explore posts from servers
BABetter Auth
Created by Kevin on 4/30/2025 in #help
Help Understanding Better-auth
Using Nextjs Ive just started messing around with better auth to understand the fundamentals of how it works. My question is around if auth and authClient are designed to be used interchangeably. I'm testing out organizations and as expected using authClient hooks like useActiveOrganization() react to changes from the auth client like authClient.organization.setActive(). When using auth like auth.api.getFullOrganization() in server components this only revalidates when using auth.api.setActiveOrganization() and im assuming this happens due to headers being passed in, i could be wrong but it is somehow being revalidated/rerun. The problem i see is if they are used interchangeably like fetching data based off the active org which uses auth.api, and i set a new active org using authClient.organization.setActive() this will cause components using authClient.useActiveOrganization() to react but the data that was fetched using auth.api would still be returning data from the old organization. The only workaround i see is using one or the other consistently but since i do all my data fetching in server components id have to use auth. Maybe i have this completely wrong but would be much appreciated if someone could give me insight on this? Thanks
14 replies
CCConvex Community
Created by Kevin on 4/23/2025 in #support-community
Convex Polar Organization Token Error
I have set the POLAR_ORGANIZATION_TOKEN in env and in convex dashboard ive tried hard coding the organization token in polar client aswell and i still get the same error. ive tried recreating thew organization token multiple times without success. ive also added all permissions to the organization token aswell with no success 4/23/2025, 6:35:18 PM [CONVEX A(polar:generateCheckoutLink)] Uncaught SDKError: API error occurred: Status 401 Content-Type application/json Body {"error": "invalid_token", "error_description": "The access token provided is expired, revoked, malformed, or invalid for other reasons."} at matchFunc (../../node_modules/@polar-sh/sdk/src/lib/matchers.ts:257:12) at async $do (../../node_modules/@polar-sh/sdk/src/funcs/checkoutsCreate.ts:169:18)
5 replies
DTDrizzle Team
Created by Kevin on 2/23/2025 in #help
Need Help!
When running 'bun drizzle-kit push' i get the following error "No config path provided, using default 'drizzle.config.ts' Reading config file '/Users/kevinchase/Documents/VS-code/react/my-app/drizzle.config.ts' Using '@Neondatabase/serverless' driver for database querying Warning '@Neondatabase/serverless' can only connect to remote Neon/Vercel Postgres/Supabase instances through a websocket [⢿] Pulling schema from database... <anonymous_script>:1 SyntaxError: Unexpected end of JSON input at JSON.parse (<anonymous>) at /Users/kevinchase/Documents/VS-code/react/my-app/node_modules/drizzle-kit/bin.cjs:19483:66 at Array.map (<anonymous>) at defaultForColumn (/Users/kevinchase/Documents/VS-code/react/my-app/node_modules/drizzle-kit/bin.cjs:19473:74) at /Users/kevinchase/Documents/VS-code/react/my-app/node_modules/drizzle-kit/bin.cjs:19070:36 at process.processTicksAndRejections (node:internal/process/task_queues:105:5) Node.js v22.14.0" This has stumped me and i have no idea where the JSON error is coming from. any help would be much appreciated. Thanks
1 replies