aws-amplify / amplify-ui

Amplify UI is a collection of accessible, themeable, performant React (and more!) components that can connect directly to the cloud.
https://ui.docs.amplify.aws
Apache License 2.0
905 stars 286 forks source link

FR (Vue Authenticator): Configure 2fa after signup VUE component #3420

Open pjmuller opened 1 year ago

pjmuller commented 1 year ago

On which framework/platform would you like to see this feature implemented?

Vue

Which UI component is this feature-request for?

Authenticator

Please describe your feature-request in detail.

Currently the SignUp component has built-in features to setup 2fa.

however, what is an existing (logged in) user wants to add 2fa. Is there a way to hook into the existing SignUp component and start at the 2fa screens.

What (low hanging fruit) alternatives do you see? Can you confirm that the only current way is to use the Amplify JS lib directly ( https://docs.amplify.aws/lib/auth/mfa/q/platform/js/ )

import { Auth } from 'aws-amplify';
Auth.setupTOTP(user).then((code) => {
  // display the code in a QR
});

Auth.verifyTotpToken(user, challengeAnswer).then(() => {
  Auth.setPreferredMFA(user, 'TOTP');
})

Please describe a solution you'd like.

No response

We love contributors! Is this something you'd be interested in working on?

reesscot commented 1 year ago

@pjmuller Thanks for your feature request. Yes, you would need to use the Amplify JS lib directly at this time, but we will consider exposing this functionality for our roadmap.