componentDidMount() { // Verify the password reset code is valid. authRef .verifyPasswordResetCode(this.props.actionCode) .then(email => { this.setState({ email, validCode: true, verifiedCode: true }); }, error => { // Invalid or expired action code. Ask user to try to reset the password // again. this.setState({ error: error.message, validCode: false, verifiedCode: true }); }); }