How to use the aws-amplify.Auth.confirmSignUp function in aws-amplify

To help you get started, we’ve selected a few aws-amplify 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 Codebrahma / serverless-grocery-app / packages / CB-serverless-backend / api / todos / registration.js View on Github external
export const verifyUser = (event, context, callback) => {
	context.callbackWaitsForEmptyEventLoop = false;
	const {username, verification} = JSON.parse(event.body);
	const data = {
		username,
		'code': verification
	}
	console.log(JSON.stringify(data))
	
	Auth.confirmSignUp(username, verification)
	.then(resposneData => onUserConfirmed(resposneData, callback))
	.catch(error => renderServerError(callback, error));
}
github dabit3 / amplify-auth-demo / src / Form.js View on Github external
async function confirmSignUp({ username, confirmationCode }, updateFormType) {
  try {
    await Auth.confirmSignUp(username, confirmationCode)
    console.log('confirm sign up success!')
    updateFormType('signIn')
  } catch (err) {
    console.log('error signing up..', err)
  }
}
github dabit3 / react-native-navigation-v2 / src / SignUp.js View on Github external
confirmSignUp = async () => {
    const { username, authenticationCode } = this.state
    try {
      await Auth.confirmSignUp(username, authenticationCode)
      console.log('successully signed up!')
      alert('User signed up successfully!')
      this.setState({ ...initialState })
    } catch (err) {
      console.log('error confirming signing up: ', err)
    }
  }
  render() {
github richardzcode / Journal-AWS-Amplify-Tutorial / step-08 / journal / src / components / ConfirmRegisterForm.js View on Github external
confirm() {
        const username = this.usernameFromAuthData() || this.inputs.username;
        const { code } = this.inputs;
        logger.debug('username: ' + username);
        Auth.confirmSignUp(username, code)
            .then(data => this.changeState('signIn', data))
            .catch(err => this.error(err));
    }
github jspsych / jsPsych-Redux-GUI / src / common / backend / auth / index.js View on Github external
export const confirmSignUp = ({username, code}) => {
	return Auth.confirmSignUp(username, code)
}
github aws-amplify / amplify-js / packages / aws-amplify-react-native / src / Auth / ConfirmSignUp.js View on Github external
confirm() {
        const { username, code } = this.state;
        logger.debug('Confirm Sign Up for ' + username);
        Auth.confirmSignUp(username, code)
            .then(data => this.changeState('signedUp'))
            .catch(err => this.error(err));
    }
github Codebrahma / serverless-grocery-app / packages / CB-serverless-frontend / src / sagas / auth / verifyUserSaga.js View on Github external
const confirmSignUpPromise = ({ username, verification }) => Auth.confirmSignUp(username, verification);
github mzohaibqc / antd-amplify-react / src / ConfirmSignUpForm.js View on Github external
confirm () {
    const username = this.usernameFromAuthData() || this.inputs.username;
    const { code } = this.inputs;
    if (!Auth || typeof Auth.confirmSignUp !== "function") {
      throw new Error(
        "No Auth module found, please ensure @aws-amplify/auth is imported"
      );
    }
    this.setState({ loading: true });
    Auth.confirmSignUp(username, code)
      .then(data => {
        this.setState({ loading: false });
        this.changeState("signIn", data);
      })
      .catch(err => {
        this.setState({ loading: false });
        message.error(err.message);
      });
  };