kstulgysK
Convex Community2y ago
2 replies
kstulgys

How do I extend convex auth with my custom auth provider?

So idea is to pass 3 things from frontend

singIn("my-custom-provider", {address, message, signature})


and this is where I'm stuck at:

export const { auth, signIn, signOut, store } = convexAuth({
  providers: [
    GitHub,
    ConvexCredentials({
      id: "my-custom-provider"
      authorize: async (credentials, ctx) => {
        const { address, message, signature } = credentials

        const evmAddress = ethers.verifyMessage(message, signature);
        const isVerified = evmAddress === address;

        // ???
      },
    }),
  ],
});


How do I finish this implementation?
Should I use ConvexCredentials or should I use something else?
Was this page helpful?