How to use the @aws-amplify/auth.resendSignUp function in @aws-amplify/auth

To help you get started, we’ve selected a few @aws-amplify/auth examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github yhenni1989 / ReactNativeAuth / src / components / screens / SignUpScreen.js View on Github external
async resendSignUp() {
    const { username } = this.state
    await Auth.resendSignUp(username)
    .then(() => console.log('Confirmation code resent successfully'))
    .catch(err => {
      if (! err.message) {
        console.log('Error requesting new confirmation code: ', err)
        Alert.alert('Error requesting new confirmation code: ', err)
      } else {
        console.log('Error requesting new confirmation code: ', err.message)
        Alert.alert('Error requesting new confirmation code: ', err.message)
      }
    })
  }
  render() {
github codexstanford / techlist-frontend-web / src / apps / admin / routes / auth / confirm.js View on Github external
handleResendRequest = () => {
    console.log('RESENDING CODE');
    Auth.resendSignUp(this.props.data.email)
      .then(data => console.log(data))
      .catch(err => console.log(err));
  };
github aws-amplify / amplify-js / packages / aws-amplify-react / src / Auth / ConfirmSignUp.jsx View on Github external
resend() {
        const username = this.usernameFromAuthData() || this.inputs.username;
        if (!Auth || typeof Auth.resendSignUp !== 'function') {
            throw new Error('No Auth module found, please ensure @aws-amplify/auth is imported');
        }
        Auth.resendSignUp(username)
            .then(() => logger.debug('code resent'))
            .catch(err => this.error(err));
    }
github TreeHacks / root / src / store / auth / actions.ts View on Github external
return (dispatch, getState) => {
    const attemptedLoginEmail = (getState().auth as IAuthState).attemptedLoginEmail;
    dispatch(loadingStart());
    Auth.resendSignUp(attemptedLoginEmail)
      .then(() => {
        dispatch(setMessage("Verification link sent. Please check your email or spam folder for the verification link."));
        dispatch(onAuthError(""));
      }).catch(e => dispatch(onAuthError("Error sending confirmation email link: " + e)))
      .then(() => dispatch(loadingEnd()));
  }
}