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

[v6] resetPassword not trigger UserMigration lambda #13425

Open
3 tasks done
natuan62 opened this issue May 24, 2024 · 2 comments
Open
3 tasks done

[v6] resetPassword not trigger UserMigration lambda #13425

natuan62 opened this issue May 24, 2024 · 2 comments
Assignees
Labels
Auth Related to Auth components/category question General question

Comments

@natuan62
Copy link

natuan62 commented May 24, 2024

Before opening, please confirm:

JavaScript Framework

Vue

Amplify APIs

Authentication

Amplify Version

v6

Amplify Categories

auth

Backend

None

Environment information

# Put output below this line


Describe the bug

when resetPassword with amplify v6, but not trigger UserMigration lambda

Expected behavior

UserMigration lambda trigger works fine

Reproduction steps

  1. resetPassword
  2. confirmResetPassword
  3. check cloud-watch but UserMigration not trigger

Code Snippet

// Put your code below this line.
import { resetPassword } from 'aws-amplify/auth';

const email = '';
await resetPassword({ username: emaill });

const password = '';
const code = '';
await confirmResetPassword({
          username: email,
          newPassword: password,
          confirmationCode: code,
        });

Log output

// Put your logs below this line


aws-exports.js

    Auth: {
      Cognito: {
        userPoolClientId: '',
        userPoolId: '',
        identityPoolId: '',
       // https://stackoverflow.com/questions/52664612/cognito-user-migration-trigger-not-firing?rq=4
        authenticationFlowType: 'USER_PASSWORD_AUTH', //<=== try to add this flowtype but it still not working
      },
    },

Manual configuration

No response

Additional configuration

No response

Mobile Device

No response

Mobile Operating System

No response

Mobile Browser

No response

Mobile Browser Version

No response

Additional information and screenshots

No response

@natuan62 natuan62 added the pending-triage Issue is pending triage label May 24, 2024
@cwomack
Copy link
Contributor

cwomack commented May 28, 2024

Hello, @natuan62 and sorry to hear you're running into this. Do you know what the UserStatus of the user is that you're trying to migrate (i.e. CONFIRMED / UNCONFIRMED / FORCE_CHANGE_PASSWORD)?

@cwomack cwomack added question General question pending-response Issue is pending response from the issue requestor and removed pending-triage Issue is pending triage labels May 28, 2024
@cwomack cwomack self-assigned this May 28, 2024
@cwomack cwomack added the Auth Related to Auth components/category label May 28, 2024
@natuan62
Copy link
Author

@cwomack Thanks for your reply. My UserStatus is CONFIRMED

@github-actions github-actions bot removed the pending-response Issue is pending response from the issue requestor label May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auth Related to Auth components/category question General question
Projects
None yet
Development

No branches or pull requests

2 participants