Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: signer account page to enable MFA, deviceFactor recovery on login #2559

Merged
merged 9 commits into from
Oct 5, 2023

Conversation

schmanu
Copy link
Member

@schmanu schmanu commented Sep 27, 2023

What it solves

  • Signer settings page for MPC signers
  • deviceFactor recovery
  • Password Recovery

Resolves #2455

How to test it

  • Login with Socials
  • Go to Settings -> Signer Account
  • Enable MFA
  • Disconnect and login again

Checklist

  • I've tested the branch on mobile 📱
  • I've documented how it affects the analytics (if at all) 📊
  • I've written a unit/e2e test for it (if applicable) 🧑‍💻

Screenshots

Screenshot 2023-10-04 at 14 40 10
Screenshot 2023-10-04 at 14 39 38

@schmanu schmanu changed the title feat: signer account page to enable MFA, deviceFactor recovery on login" feat: signer account page to enable MFA, deviceFactor recovery on login Sep 27, 2023
@github-actions
Copy link

github-actions bot commented Sep 27, 2023

Branch preview

❌ Deploy failed!

@schmanu schmanu requested a review from usame-algan September 27, 2023 13:16
@github-actions
Copy link

github-actions bot commented Sep 27, 2023

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

src/components/settings/SignerAccountMFA/index.tsx Outdated Show resolved Hide resolved
src/components/settings/SignerAccountMFA/index.tsx Outdated Show resolved Hide resolved
src/components/settings/SignerAccountMFA/useMFASettings.ts Outdated Show resolved Hide resolved
src/components/settings/SignerAccountMFA/useMFASettings.ts Outdated Show resolved Hide resolved
src/hooks/wallets/mpc/useMPCWallet.ts Outdated Show resolved Hide resolved
src/pages/settings/signer-account.tsx Outdated Show resolved Hide resolved
@iamacook iamacook mentioned this pull request Sep 27, 2023
3 tasks
@schmanu schmanu requested a review from iamacook October 4, 2023 12:41
src/components/common/ConnectWallet/PasswordRecovery.tsx Outdated Show resolved Hide resolved
src/components/settings/SignerAccountMFA/index.tsx Outdated Show resolved Hide resolved
src/components/settings/SignerAccountMFA/index.tsx Outdated Show resolved Hide resolved
src/components/settings/SignerAccountMFA/index.tsx Outdated Show resolved Hide resolved
src/components/settings/SignerAccountMFA/index.tsx Outdated Show resolved Hide resolved
src/hooks/wallets/mpc/__tests__/useMPCWallet.test.ts Outdated Show resolved Hide resolved
src/hooks/wallets/mpc/recovery/DeviceShareRecovery.ts Outdated Show resolved Hide resolved
src/hooks/wallets/mpc/recovery/SecurityQuestionRecovery.ts Outdated Show resolved Hide resolved
src/hooks/wallets/mpc/useMPCWallet.ts Outdated Show resolved Hide resolved
@schmanu schmanu requested a review from iamacook October 4, 2023 15:46
Comment on lines 29 to 32
confirmPassword: '',
oldPassword: undefined,
newPassword: '',
storeDeviceShare: isDeviceShareStored,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
confirmPassword: '',
oldPassword: undefined,
newPassword: '',
storeDeviceShare: isDeviceShareStored,
[PasswordFieldNames.confirmPassword]: '',
[PasswordFieldNames.oldPassword]: undefined,
[PasswordFieldNames.newPassword]: '',
[PasswordFieldNames.storeDeviceShare]: isDeviceShareStored,

if (!mpcCoreKit) {
return false
}
const { shareDescriptions } = mpcCoreKit?.getKeyDetails()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const { shareDescriptions } = mpcCoreKit?.getKeyDetails()
const { shareDescriptions } = mpcCoreKit.getKeyDetails()

return false
}
const { shareDescriptions } = mpcCoreKit?.getKeyDetails()
return !Object.entries(shareDescriptions).some((value) => value[0]?.includes('hashedShare'))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return !Object.entries(shareDescriptions).some((value) => value[0]?.includes('hashedShare'))
return !Object.values(shareDescriptions).some((value) => value[0]?.includes('hashedShare'))

@schmanu schmanu requested a review from iamacook October 5, 2023 07:35
@schmanu schmanu merged commit dbd1cc1 into web3authcoresdk Oct 5, 2023
3 of 7 checks passed
@schmanu schmanu deleted the seedless-mfa branch October 5, 2023 07:47
@github-actions github-actions bot locked and limited conversation to collaborators Oct 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants