Skip to content

Commit

Permalink
Bugfix for pendingVerification check when verifying a link via email
Browse files Browse the repository at this point in the history
I am not 100% sure if this code path is exposed or not, but if it was then it was broken.
  • Loading branch information
paustint committed Dec 27, 2024
1 parent 60d4f50 commit e4b6b1c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions apps/api/src/app/controllers/auth.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -739,9 +739,7 @@ const verifyEmailViaLink = createRoute(routeDefinition.verification.validators,

const { code } = query;

const pendingVerification = req.session.pendingVerification.find(({ type }) => {
type === 'email';
});
const pendingVerification = req.session.pendingVerification.find(({ type }) => type === 'email');

if (!pendingVerification) {
throw new InvalidSession('Missing pending verification');
Expand Down

0 comments on commit e4b6b1c

Please sign in to comment.