Skip to content

Commit

Permalink
Merge branch 'new-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
jayair committed May 24, 2018
2 parents 6cffb2e + c755d7a commit b0128b1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
"react-router-bootstrap": "^0.24.4",
"react-router-dom": "^4.2.2",
"react-scripts": "1.1.1",
"react-stripe-elements": "^1.6.0",
"uuid": "^3.2.1"
"react-stripe-elements": "^1.6.0"
},
"scripts": {
"start": "react-scripts start",
Expand Down
8 changes: 4 additions & 4 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ const dev = {
},
cognito: {
REGION: "us-east-1",
USER_POOL_ID: "us-east-1_riBVwCuuL",
APP_CLIENT_ID: "481f4tml24658792d685ib9l05",
USER_POOL_ID: "us-east-1_yKOQs2dWK",
APP_CLIENT_ID: "1h0r8s763vnqj4id6dvguanp8f",
IDENTITY_POOL_ID: "us-east-1:dedfd34a-9d7e-4bf2-a1dd-ef603bac2ecb"
}
};
Expand All @@ -28,8 +28,8 @@ const prod = {
},
cognito: {
REGION: "us-east-1",
USER_POOL_ID: "us-east-1_Ko7Jw6kaT",
APP_CLIENT_ID: "4uhibottdv2qs37vd9t4vod4cl",
USER_POOL_ID: "us-east-1_TwYpMXIJH",
APP_CLIENT_ID: "6kfg0o7qo2i3ndk2ur906sc5fd",
IDENTITY_POOL_ID: "us-east-1:f4c754b4-24f0-4754-8596-30afedece1fc"
}
};
Expand Down
10 changes: 3 additions & 7 deletions src/containers/Signup.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { Component } from "react";
import uuidv4 from "uuid/v4";
import {
HelpBlock,
FormGroup,
Expand Down Expand Up @@ -49,11 +48,8 @@ export default class Signup extends Component {

try {
const newUser = await Auth.signUp({
username: uuidv4(),
password: this.state.password,
attributes: {
email: this.state.email
}
username: this.state.email,
password: this.state.password
});
this.setState({
newUser
Expand All @@ -71,7 +67,7 @@ export default class Signup extends Component {
this.setState({ isLoading: true });

try {
await Auth.confirmSignUp(this.state.newUser.user.username, this.state.confirmationCode);
await Auth.confirmSignUp(this.state.email, this.state.confirmationCode);
await Auth.signIn(this.state.email, this.state.password);

this.props.userHasAuthenticated(true);
Expand Down

0 comments on commit b0128b1

Please sign in to comment.