I use Node.js and Next.js. My redirect get to my client then call get callback API to this code:
export const loginCallback = async (ctx) => {
await passport.authenticate('facebook', { session: false }),
console.log('masuk ga')
let token, refreshToken;
const user = await Users.query().where("email", "[email protected]").where("deleted_at", null).execute();
token = await generateTokenFB(user[0].id, appConfig.secretAccessToken, appConfig.expAccessToken);
refreshToken = await generateTokenFB(user[0].id, appConfig.secretRefreshToken, appConfig.expRefreshToken);
}
I use JWT not session. and the token what I get is, my web token not from facebook.
What is the alternative for save my token from facebook?
here's my app.ts codes: https://pastebin.com/2JJxW9dR
I tried everything but it doesn't work.