Open Limitless-Kode opened 5 months ago
Up
Any updates on this? Experiencing the same
Any updates on this? Experiencing the same
As a fix, I decided to convert the return value to an Elysia & { jwt: typeof jwt }
jwt({
name: "jwt",
secret: env.JWT_SECRET,
algorithms: ["HS256"],
ignoreExpiration: false,
audience: "https://api.domain.com",
issuer: "https://api.domain.com",
maxAge: "1d",
clockTolerance: 0,
}) as Elysia & { jwt: typeof jwt };
Thanks, that is a workable fix for now
Updating to the latest version (1.1.0) fixed it for me
I added
@elysiajs/jwt ^1.0.2
to my project and initialised it with the.use
hook. Everything seems to work fine however it breaks the type inference causing the handler method parameters to implicitly return a type of any.jwt
,query
,set
, andauth
now implicitly have the type of any