1. Adjusted gitignore path

2. Formatted files
This commit is contained in:
gbuomprisco
2025-03-06 07:47:32 +07:00
parent 723fb1743e
commit 08cd6983f4
5 changed files with 19 additions and 16 deletions

View File

@@ -14,7 +14,12 @@ const SendOtpEmailSchema = z.object({
// Purpose of the OTP (e.g., 'email-verification', 'password-reset')
purpose: z.string().min(1).max(1000),
// how long the OTP should be valid for. Defaults to 1 hour. Max is 7 days. Min is 30 seconds.
expiresInSeconds: z.number().min(30).max(86400 * 7).default(3600).optional(),
expiresInSeconds: z
.number()
.min(30)
.max(86400 * 7)
.default(3600)
.optional(),
});
/**
@@ -35,7 +40,9 @@ export const sendOtpEmailAction = enhanceAction(
// this is highly unlikely to happen, but we want to make sure the client-side code is correct in
// sending the correct user email
if (data.email !== email) {
throw new Error('User email does not match the email provided. This is likely an error in the client.');
throw new Error(
'User email does not match the email provided. This is likely an error in the client.',
);
}
try {