dev-xo / remix-auth-totp

A Time-Based One-Time Password (TOTP) Authentication Strategy for Remix-Auth.
https://totp.fly.dev
MIT License
418 stars 28 forks source link

[ Fix ] Error in Node 20+ #68

Closed markhker closed 3 months ago

markhker commented 3 months ago

The published version of the "thirty-two" npm package is outdated, making use of new Buffer in the code, causing some errors (tested in AWS Lambda) and it's impossible to encode/decode with those settings, also the @epic-web/totp package (used by this lib) has the same issue.

dev-xo commented 3 months ago

Interesting, also good to know @markhker.

We are leveraging those packages as it offers us a solution to avoid implementing some of the functionalities they provide. Not sure if you have any temporary solution in mind; if so, let us know, as we will be more than happy to look into.

Also, please share with us an example of your use case, as it will help us get an idea of the changes the library may need to adapt to Node 20+ or even contact Kent for the @epic-web/totp package.

kldeb commented 3 months ago

I can confirm that removing the "thirty-two" npm package from this code base and epic-web's works both locally on my machine and running on aws lambda

kldeb commented 3 months ago

PR here: https://github.com/dev-xo/remix-auth-totp/pull/70