From 9a908926b3fbfe6fc23967c79eabc40237f085e7 Mon Sep 17 00:00:00 2001 From: "rania.morheg@atayen.us" Date: Tue, 23 May 2023 10:38:05 +0100 Subject: [PATCH] resolve probleme of another authentication method for wallet V2 --- middleware/passport.middleware.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/middleware/passport.middleware.js b/middleware/passport.middleware.js index 00ade2df0..bb501a092 100644 --- a/middleware/passport.middleware.js +++ b/middleware/passport.middleware.js @@ -738,7 +738,8 @@ exports.linkFacebookAccount = async ( } else { await User.updateOne( { _id: user_id }, - { $set: { idOnSn: profile._json.token_for_business } } + + { $set: { idOnSn: profile._json.token_for_business, completed: true } } ) return cb(null, profile, { status: true, @@ -771,7 +772,8 @@ exports.linkGoogleAccount = async ( } else { await User.updateOne( { _id: user_id }, - { $set: { idOnSn2: profile.id } } + + { $set: { idOnSn2: profile.id, completed: true} } ) return done(null, profile, { status: true, @@ -803,7 +805,8 @@ exports.telegram_connect_function = async (req, profile, cb) => { } else { await User.updateOne( { _id: user_id }, - { $set: { idOnSn3: profile.id } } + + { $set: { idOnSn3: profile.id, completed: true } } ) return cb(null, profile, { status: true,