|
|
@ -690,6 +690,7 @@ function LoginForm(p) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function responseGoogle(response) { |
|
|
|
function responseGoogle(response) { |
|
|
|
|
|
|
|
//setMessage(JSON.stringify(response))
|
|
|
|
if (response.error) { |
|
|
|
if (response.error) { |
|
|
|
setMessage(JSON.stringify(response)) |
|
|
|
setMessage(JSON.stringify(response)) |
|
|
|
} else
|
|
|
|
} else
|
|
|
@ -701,14 +702,15 @@ function LoginForm(p) { |
|
|
|
axios.post(GetBackendURL(p)+"/registerUser",{ |
|
|
|
axios.post(GetBackendURL(p)+"/registerUser",{ |
|
|
|
username:response.profileObj.name, |
|
|
|
username:response.profileObj.name, |
|
|
|
email:response.profileObj.email, |
|
|
|
email:response.profileObj.email, |
|
|
|
password:response.profileObj.tokenId, |
|
|
|
password:response.tokenId, |
|
|
|
avatar:response.profileObj.imageUrl, |
|
|
|
avatar:response.profileObj.imageUrl, |
|
|
|
userID:response.profileObj.googleId, |
|
|
|
userID:response.profileObj.googleId, |
|
|
|
|
|
|
|
recoveryhash:response.profileObj.googleId |
|
|
|
}) |
|
|
|
}) |
|
|
|
.then((data)=>{ |
|
|
|
.then((data)=>{ |
|
|
|
if (data.data.verified) { |
|
|
|
if (data.data.verified) { |
|
|
|
p.setLOGGEDINUSER(response.profileObj.name) |
|
|
|
p.setLOGGEDINUSER(response.profileObj.name) |
|
|
|
p.setLOGGEDINHASH(response.profileObj.tokenId) |
|
|
|
p.setLOGGEDINHASH(response.tokenId) |
|
|
|
setUsername("") |
|
|
|
setUsername("") |
|
|
|
setPassword("") |
|
|
|
setPassword("") |
|
|
|
setRememberMe(false) |
|
|
|
setRememberMe(false) |
|
|
|