File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change 1010 "react-router-bootstrap" : " ^0.24.4" ,
1111 "react-router-dom" : " ^4.2.2" ,
1212 "react-scripts" : " 1.1.1" ,
13- "react-stripe-elements" : " ^1.6.0" ,
14- "uuid" : " ^3.2.1"
13+ "react-stripe-elements" : " ^1.6.0"
1514 },
1615 "scripts" : {
1716 "start" : " react-scripts start" ,
Original file line number Diff line number Diff line change 11import React , { Component } from "react" ;
2- import uuidv4 from "uuid/v4" ;
32import {
43 HelpBlock ,
54 FormGroup ,
@@ -49,11 +48,8 @@ export default class Signup extends Component {
4948
5049 try {
5150 const newUser = await Auth . signUp ( {
52- username : uuidv4 ( ) ,
53- password : this . state . password ,
54- attributes : {
55- email : this . state . email
56- }
51+ username : this . state . email ,
52+ password : this . state . password
5753 } ) ;
5854 this . setState ( {
5955 newUser
@@ -71,7 +67,7 @@ export default class Signup extends Component {
7167 this . setState ( { isLoading : true } ) ;
7268
7369 try {
74- await Auth . confirmSignUp ( this . state . newUser . user . username , this . state . confirmationCode ) ;
70+ await Auth . confirmSignUp ( this . state . email , this . state . confirmationCode ) ;
7571 await Auth . signIn ( this . state . email , this . state . password ) ;
7672
7773 this . props . userHasAuthenticated ( true ) ;
You can’t perform that action at this time.
0 commit comments