Skip to content

Commit

Permalink
emailVerified
Browse files Browse the repository at this point in the history
  • Loading branch information
u1-liquid committed Dec 21, 2024
1 parent 8f27787 commit 181ac8d
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private userSecurityKeysRepository: UserSecurityKeysRepository,
) {
super(meta, paramDef, async (ps, me) => {
const profile = await this.userProfilesRepository.findOneBy({ email: ps.email });
const profile = await this.userProfilesRepository.findOneBy({
email: ps.email,
emailVerified: true,
});

const passwordMatched = await bcrypt.compare(ps.password, profile?.password ?? '');
if (!profile || !passwordMatched) {
Expand Down

0 comments on commit 181ac8d

Please sign in to comment.