-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
pending-maintainer-responseIssue is pending a response from the Amplify team.Issue is pending a response from the Amplify team.questionGeneral questionGeneral question
Description
Before opening, please confirm:
- I have searched for duplicate or closed issues and discussions.
- I have read the guide for submitting bug reports.
- I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
JavaScript Framework
React Native
Amplify APIs
Authentication
Amplify Version
v6
Amplify Categories
auth
Backend
None
Environment information
Details
# Put output below this line
Describe the bug
- email received first time when updateUserAttributes is used.
- to resend the code, I use sendUserAttributeVerificationCode but can't receive any code
Expected behavior
- sendUserAttributeVerificationCode should be working and email should be received
Reproduction steps
- use signup method to register as anonymous user i.e username=uuid.v4() and password=uuid.v4()
- use updateUserAttributes method
- use updatePassword to update new password entered by user
- At this time, email is received which is fine.
- To resend verification code, call sendUserAttributeVerificationCode but can't receive any email
Code Snippet
import { signUp, signIn, updatePassword, updateUserAttributes, sendUserAttributeVerificationCode } from "aws-amplify/auth"
1. register as anonymous user:
generateAnonymousUserCredentials() {
const username = uuidToString(uuid.v4())
const password = uuidToString(uuid.v4()).slice(0, 10)
const signUpResult: SignUpOutput = yield signUp({
username,
password,
})
yield signIn({ username, password })
}
2. after using updateAttributes, I get email which is fine.
const updateAttributes = async (values) =>{
const userAttributes = {
family_name: values.lastName,
given_name: values.firstName,
email: values.email,
}
await updateUserAttributes({ userAttributes })
await updatePassword({
oldPassword: values.oldPassword,
newPassword: values.password,
})
}
3. After 1 minute, I try to use resendCode to get verification code but I can't receive it.
const resendCode = async () => {
await sendUserAttributeVerificationCode({
userAttributeKey:"email",
})
}Log output
Details
// Put your logs below this line
1. after using after using updateAttributes, got following response and also got email:
{
"CodeDeliveryDetailsList": [
{
"AttributeName": "email",
"DeliveryMedium": "EMAIL",
"Destination": "h***@g***"
}
]
}
2. after using sendUserAttributeVerificationCode, got following response but no email:
{
"CodeDeliveryDetails": {
"AttributeName": "email",
"DeliveryMedium": "EMAIL",
"Destination": "h***@g***"
}
}
aws-exports.js
No response
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
I have also looked into https://github.com/aws-amplify/amplify-js/issues/13432 that is already reported but I still can't find any solution.
Metadata
Metadata
Assignees
Labels
pending-maintainer-responseIssue is pending a response from the Amplify team.Issue is pending a response from the Amplify team.questionGeneral questionGeneral question