im trying to get the logged in users email on the backend: const ThirdParty = require("supertokens-...
b
im trying to get the logged in users email on the backend: const ThirdParty = require("supertokens-node/recipe/thirdparty"); async function generateNewInvoice(req, res, next) { const userId = session.userId; let userInfo = await ThirdParty.getUserById(userId); But it dies at the ThirdParty.getByUserId() method: Uncaught Error Error: Initialisation not done. Did you forget to call the SuperTokens.init function. Im following this guide basically exactly. What am I doing wrong? https://supertokens.com/docs/thirdparty/common-customizations/get-user-info#using-getuserbyid
r
Hey. Which recipe have you initialised on the backend?
b
email password
r
Right. So you shouldn’t import from thirdparty recipe.
b
Ohhhhhhhhhhhhhhhh. Thanks. Makes sense in hind sight
I cant tell you how much a appreciate the support. There is nothing worse than having no one to talk to when working on a project.
a
Damn..it saved me ton of time.