Skip to content

Commit

Permalink
chore: Fix an integration test edge case while testing MFA/OTP codes
Browse files Browse the repository at this point in the history
  • Loading branch information
vincetran committed Jan 28, 2025
1 parent 08da562 commit ae4d682
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,10 @@ class AWSCognitoAuthPluginEmailMFATests {
{ println("====== Subscription Established ======") },
{
println("====== Received some MFA Info ======")
mfaCode = it.data.code
latch?.countDown()
if (it.data.username == userName) {
mfaCode = it.data.code
latch?.countDown()
}
},
{ println("====== Subscription Failed $it ======") },
{ }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,10 @@ class AWSCognitoAuthPluginUserAuthTests {
{ println("====== Subscription Established ======") },
{
println("====== Received some MFA Info ======")
otpCode = it.data.code
latch?.countDown()
if (it.data.username == userName) {
otpCode = it.data.code
latch?.countDown()
}
},
{ println("====== Subscription Failed $it ======") },
{ }
Expand Down

0 comments on commit ae4d682

Please sign in to comment.