Skip to content

Commit

Permalink
Resolve the problem of implementing an alternative authentication met…
Browse files Browse the repository at this point in the history
…hod for Wallet V2. (#197)

## Description:
Hey team,

This PR aims to resolve an authentication method issue specifically for
Wallet V2 accounts in our application. Currently, we encounter problems
when attempting to connect with alternative authentication methods that
involve passphrase generation. However, Wallet V2 accounts do not
require passphrase generation. To address this issue and provide a
seamless authentication experience, we have made the following changes:

Conducted thorough testing on the "completed" variable in our database
to ensure its compatibility and functionality with Wallet V2 accounts.
Modified the authentication process to eliminate the need for passphrase
generation for Wallet V2 accounts.
## Changes Made:

Rigorously tested the "completed" variable in our database to ensure its
effectiveness for Wallet V2 accounts.
Adjusted the authentication process to bypass passphrase generation for
Wallet V2 accounts, resolving the authentication method issue.
## Notes for Reviewers:

Kindly review the changes made to ensure that Wallet V2 accounts no
longer encounter issues with alternative authentication methods.
We welcome your feedback, suggestions, and alternative approaches to
further enhance the implementation and user experience.
Thank you for your time and consideration. Your feedback is highly
appreciated.

Best regards,
Rania Morheg
  • Loading branch information
ksibisamir authored May 24, 2023
2 parents 988eabb + 9a90892 commit a111d75
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions middleware/passport.middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit a111d75

Please sign in to comment.