ITEnthusiasm
01/12/2024, 11:15 PMimport Session from "supertokens-node/recipe/session"
Fails for ESM. Instead,
import Session from "supertokens-node/recipe/session/index.js"
must be used.
It might be worth adding an exports
field to package.json
in supertokens-node
(see https://nodejs.org/api/esm.html#import-specifiers) to make the DX easier/more intuitive. Very likely, more devs will end up using ESM in the future. It's just a question of when the "boom" will come in. The "boom" doesn't seem to be now, but more JS frameworks are starting to migrate to ESM, it seems.SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).
Powered by