I am trying to run some logic to insert default data about a user when they sign up. I am using convex-auth
import GitHub from "@auth/core/providers/github";
import Resend from "@auth/core/providers/resend";
import { convexAuth } from "@convex-dev/auth/server";
import { adventurerPaymentScheme } from "./utils/monetization";
import { email } from "zod";
export const { auth, signIn, signOut, store, isAuthenticated } = convexAuth({
providers: [
GitHub({
profile(githubProfile, _tokens) {
console.log(githubProfile);
return {
id: githubProfile.id.toString(),
name: githubProfile.name ?? githubProfile.login,
email: githubProfile.email,
image: githubProfile.avatar_url,
};
},
}),
Resend,
],
});
however, the problem with usConvexAuth({}) is that these callbacks run on EVERY sign in, not just the sign up. how do I run on sign up?