1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Is there any way to get an event or notification when a user scans the QR code during MFA...

Discussão em 'Angular' iniciado por PayiòxGSL, Agosto 12, 2025.

  1. PayiòxGSL

    PayiòxGSL Guest

    I’m using AWS Amplify Gen 2 API in my Angular app to set up TOTP MFA. After calling Auth.setupTOTP(), I receive the QR code URI which I display for the user to scan. However, I want to know if there’s any way to detect or be notified when the user actually scans the QR code with their authenticator app.

    async handleTOTPSetup (user: any): Promise<any | null> {
    try {
    const totpSetupDetails await setUpTOTP();
    console.log('TOTP Setup Details~', totpSetupDetails);
    const setupuri totpSetupDetails.getSetupUri('xyz', user);
    console.log('TOTP Setup URI ~', setupUri);
    const sharedSecret totpSetupDetails.sharedSecret;
    return { setupUri, sharedSecret };
    catch (error) {
    console.log(error);
    return null;
    }
    }


    Does Amplify Gen 2 provide any event or callback for this? If not, what’s the best practice to handle or track this?

    Continue reading...

Compartilhe esta Página