mxstbr / passport-magic-login

Passwordless authentication with magic links for Passport.js.
MIT License
664 stars 45 forks source link

Edge Runtime compatibility #28

Closed pedrosimao closed 1 year ago

pedrosimao commented 1 year ago

Any timeframe for this becoming compatible with Edge runtime? I am trying to use and I get the following Typescript error:

TS2345: Argument of type '(req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>, res: Response<any, Record<string, any>>) => void' is not assignable to parameter of type 'Nextable<RequestHandler<NextRequest, NextFetchEvent>> | RouteMatch'.   Type '(req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>, res: Response<any, Record<string, any>>) => void' is not assignable to type 'Nextable<RequestHandler<NextRequest, NextFetchEvent>>'.     Types of parameters 'req' and 'args_0' are incompatible.       Type 'NextRequest' is missing the following properties from type 'Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>': get, header, accepts, acceptsCharsets, and 83 more.
mxstbr commented 1 year ago

passport-magic-login uses the standard Node.js types, so it sounds like there needs to be some compatibility layer on the Edge runtime side.