I was making a website written in Typescript with Dashboard and the login is the Discord Oauth2.
I started my app and the Console gave me a new error:
TypeError: Cannot read properties of undefined (reading 'push')
at Authenticator.serializeUser (/home/project/node_modules/passport/lib/authenticator.js:254:30)
at Object.<anonymous> (/home/project/build/wbs/server/users/routes.config.js:70:30)
at Module._compile (node:internal/modules/cjs/loader:1097:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1149:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:999:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/home/project/build/wbs/server/main.js:37:41)
at Module._compile (node:internal/modules/cjs/loader:1097:14)
I searched the line 70 of the file routes.config.js
and the line is this.
passport.serializeUser(function(user, done) {
// @ts-ignore
done(null, user.discordId);
});
I really don't know what to say.
Can someone help me? If more info is needed I will add it.