Skip to content
This repository has been archived by the owner on Jan 6, 2024. It is now read-only.

Commit

Permalink
Check if account is verified
Browse files Browse the repository at this point in the history
  • Loading branch information
MrXyfir committed Mar 26, 2019
1 parent a84d79e commit 176839d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/lib/login/passwordless/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ export async function startPasswordlessLogin(
await storage.init(STORAGE);
const user: Accownt.User = await storage.getItem(`user-${userId}`);

if (!user.verified) throw 'You must verify your account first';

const token = await signJWT(user.id, user.email, TEMP_JWT_EXPIRES_IN);
const link = `${ACCOWNT_API_URL}/login/passwordless?jwt=${token}`;
await sendMail({
Expand Down

0 comments on commit 176839d

Please sign in to comment.