route -> 'server/api/register
const { email, password } = await useValidatedBody(event, {
email: z.string().email(),
password: z.string().min(8).max(128),
});
try {
const user = await useAuth().createUser({
primaryKey: {
providerId: "email",
providerUserId: email,
password: password
},
attributes: {
email,
},
});
route -> 'server/api/register
const { email, password } = await useValidatedBody(event, {
email: z.string().email(),
password: z.string().min(8).max(128),
});
try {
const user = await useAuth().createUser({
primaryKey: {
providerId: "email",
providerUserId: email,
password: password
},
attributes: {
email,
},
});