How to access mutations/queries from authAdapters in next auth convex setup?
I followed through this https://stack.convex.dev/nextauth-adapter and was able to setup adapters for convex, and my application works just fine.
Currently I am using mutations I created to
createUser
or stuff like that, but I can see that most of the queries or mutations that I require are already present in the authAdadpter.ts file, so I was wondering how can I use it in my applicaiton?
I try to call it, but I am presented with this error.
I understand that createUser
mutation is wrapped with a custom mutation in authAdapter.ts which requires a secret key (CONVEX_AUTH_SECRET_KEY) , but how can I pass that exactly?
/authAdapter.ts
Convex Adapter for Auth.js (NextAuth) Setup Guide
Learn how to install and configure the Convex adapter for Auth.js as part of getting set up with Convex and Next.js.
4 Replies
Where are you trying to call the mutation from?
1. Client-side (React)
2. Next.js server
3. Convex (Actions)
?
@Michal Srb, Next.js server
From Next.js server code you can:
It was that easy, lol. Thank you.
I am getting this typescript error tho?
Solved it @Michal Srb , thanks again.