close
The Wayback Machine - https://web.archive.org/web/20210716164937/https://github.com/aws-amplify/amplify-js/issues/7982
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

Auth.verifyCurrentUserAttribute does not send sms #7982

Open
4 tasks done
bishonbopanna opened this issue Mar 23, 2021 · 1 comment
Open
4 tasks done

Auth.verifyCurrentUserAttribute does not send sms #7982

bishonbopanna opened this issue Mar 23, 2021 · 1 comment

Comments

@bishonbopanna
Copy link
Task lists! Give feedback

@bishonbopanna bishonbopanna commented Mar 23, 2021

Before opening, please confirm:

  • I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
  • I have searched for duplicate or closed issues.
  • 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.

How did you install the Amplify CLI?

yarn

If applicable, what version of Node.js are you using?

v15.12.0

Amplify CLI Version

4.45.2

What operating system are you using?

Mac

Amplify Categories

auth

Amplify Commands

add, init

Describe the bug

Auth.verifyCurrentUserAttribute('phone_number') API does not send sms with code to verify.

Expected behavior

Sms with code is expected

Reproduction steps

  1. Amplify init
  2. Add auth
  3. write the below logic to send OTP - which does not give any error but we dont get any OTP

ENV is in ap-south-1 (Mumbai) and number is provided that of US.

Auth.currentAuthenticatedUser()
            .then((cognitoUser) => {
                Auth.updateUserAttributes(cognitoUser, {
                    'phone_number': this.state.phone
                }).then(res => {
                    Auth.verifyCurrentUserAttribute('phone_number')
                        .then(() => {
                            console.log('a verification code is sent');
                            alert("OTP Sent")
                        }).catch((e) => {
                        console.log('failed with error', e);
                    });
                }).catch(err => {
                    console.error(err);
                });
            }).catch(err => {
            console.error(err);
        });

GraphQL schema(s)

# Put schemas below this line

Log output

# Put your logs below this line


Question - Are there any additional configs needed in Cognito ? This was a working code and after initializing a new env UNDER A NEW ACCOUNT it has got it to stop working.

@kaustavghosh06 kaustavghosh06 transferred this issue from aws-amplify/amplify-cli Mar 23, 2021
@chrisbonifacio chrisbonifacio added this to To be reproduced in Issues Triaging Apr 28, 2021
@stale
Copy link

@stale stale bot commented Jun 9, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants