diff --git a/docs/pages/guides/email-and-password/email-verification-codes.md b/docs/pages/guides/email-and-password/email-verification-codes.md index 8a7913aaf..d77c65040 100644 --- a/docs/pages/guides/email-and-password/email-verification-codes.md +++ b/docs/pages/guides/email-and-password/email-verification-codes.md @@ -119,7 +119,7 @@ When resending verification emails, make sure to implement rate limiting based o Validate the verification code by comparing it against your database and checking the expiration and email. Make sure to invalidate all user sessions. ```ts -import { isWithinExpiration } from "oslo"; +import { isWithinExpirationDate } from "oslo"; import type { User } from "lucia"; app.post("/email-verification", async () => { @@ -174,7 +174,7 @@ async function verifyVerificationCode(user: User, code: string): Promise { // ... @@ -131,7 +131,7 @@ app.get("email-verification/:token", async () => { } await db.commit(); - if (!token || !isWithinExpiration(token.expires_at)) { + if (!token || !isWithinExpirationDate(token.expires_at)) { return new Response(null, { status: 400 });