Search code examples
react-nativeamazon-cognitoaws-amplify

Why amplify is giving me this error despite it does doing the auth?


I'm coding an Auth with react Native, aws-amplify in vsCode and I have the next code:


    import Amplify, { Auth } from 'aws-amplify';
    import awsconfig from './app/aws-exports';
    Amplify.configure(awsconfig);

     signUp: ()=>{
              Auth.signUp({
                username: 'jul***p***@**il.com', 
                password: '******',
                email:'jul***p***@**il.com',
                phone: '1111111111'
              }).then((res,error) => {
                console.log('Signed up!', res);
              }).cath(error => {
                console.log('error: ',error);
              })
            }

Clearly, I have correct data for user in the request, I granted the correct permissions to the User and the deploy at AWS was successful, but I'm having the next Error:

TypeError: _ aws Amplify.Auth.confirmSignUp(...).then(...).catch is not a function

if somebody has any idea, I'd thank you.


Solution

  • I'm so sorry, It was a little bit stupid... Just I had to change the word 'cath' to 'catch'. This was the error.