misc: made users automatically verified

This commit is contained in:
Sheen Capadngan
2024-11-09 00:38:45 +08:00
parent 8a14914bc3
commit 9e4b66e215
2 changed files with 10 additions and 0 deletions

View File

@ -5,6 +5,9 @@ export const mockSmtpServer = (): TSmtpService => {
return {
sendMail: async (data) => {
storage.push(data);
},
verify: async () => {
return true;
}
};
};

View File

@ -240,6 +240,13 @@ export const oidcConfigServiceFactory = ({
},
tx
);
if (newUser && !newUser.isEmailVerified) {
// we automatically mark it as email-verified because we've configured trust for OIDC emails
newUser = await userDAL.updateById(newUser.id, {
isEmailVerified: true
});
}
}
}