I want to create new user accounts from the backend using convex-auth, but I am getting this error:
This expression is not callable.
here is the source code:
`export const createUser = internalAction({
args: {
email: v.string(),
password: v.string(),
},
handler: async (ctx, args) => {
const createUser = await signIn("password", { email:args.email, password:args.password, flow: "signUp" })
}
})
`
Should I just hash the password string using SCRIPT from LUCIA, then create a user in the users and authAccounts tables?
ref github code:
crypto: { async hashSecret(password: string) { return await new Scrypt().hash(password); }, async verifySecret(password: string, hash: string) { return await new Scrypt().verify(hash, password); }, }, extraProviders: [config.reset, config.verify], ...config, }); }