arikchakma / mly.fyi

Monitor your sent emails effortlessly. Gain insights on delivery status and engagement metrics with ease.
https://mly.fyi
MIT License
96 stars 10 forks source link

Invalid time period format error #29

Closed garanda21 closed 4 months ago

garanda21 commented 4 months ago

Verify your email address e-mail is received correctly, but when click on validation link http://localhost:4321/verify-account/... or when try to login to using UI http://localhost:4321/api/v1/auth/login I get the error:

Invalid time period format

CleanShot 2024-06-07 at 19 39 00@2x

{
    "type": "internal_error",
    "status": 500,
    "message": "Invalid time period format",
    "errors": []
}

Container log:

TypeError: Invalid time period format
    at default (file:///app/node_modules/.pnpm/jose@5.2.4/node_modules/jose/dist/node/esm/lib/secs.js:10:15)
    at SignJWT.setExpirationTime (file:///app/node_modules/.pnpm/jose@5.2.4/node_modules/jose/dist/node/esm/jwt/produce.js:54:74)
    at createToken (file:///app/dist/server/chunks/pages/_code__Boop2Qnt.mjs:316:84)
    at handle (file:///app/dist/server/chunks/pages/login_CBh_LCiK.mjs:54:23)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Module.<anonymous> (file:///app/dist/server/chunks/pages/_code__Boop2Qnt.mjs:489:30)
    at async renderEndpoint (file:///app/dist/server/chunks/astro_DYxJoNmB.mjs:370:20)
    at async callMiddleware (file:///app/dist/server/entry.mjs:977:10)
    at async RenderContext.render (file:///app/dist/server/entry.mjs:1466:22)
    at async NodeApp.render (file:///app/dist/server/entry.mjs:2025:18)

Additional information:

My actual time zone is CET (UTC +2), I've tried setting TZ variable but no luck, same error.

arikchakma commented 4 months ago

Your JWT_EXPIRES_IN variable format should be JWT_EXPIRES_IN=31d, which means it will be valid for 31 days.