diff --git a/src/Components/LoginContainer.js b/src/Components/LoginContainer.js index d10a7cde7221b5fa2b06dd4342cd9c81564c7a21..3249880ea50be7279888f07d19b3fcd0e6938878 100644 --- a/src/Components/LoginContainer.js +++ b/src/Components/LoginContainer.js @@ -37,7 +37,9 @@ const responseGoogle = (response) => { (error) => {console.log(error)} ) } - +const handleGoogle = () => { + axios.get('https://api.portalmec.c3sl.ufpr.br/v1/omniauth/google_oauth2?auth_origin_url=https://api.portalmec.c3sl.ufpr.br/v1/auth/google_auth2&omniauth_window_type=sameWindow&resource_class=User').then((res) => {console.log(res)}, (err) => {console.log(err)}) +} class LoginContainer extends Component { constructor (props) { super(props); @@ -90,15 +92,15 @@ class LoginContainer extends Component { <div style={{paddingTop: "20px"}}> <div style={{marginTop:"0"}}> - <StyledGoogleLoginButton + {/*<StyledGoogleLoginButton clientId="288460085642-k4veg4fo8kddvjer8b055n9da5qtgha7.apps.googleusercontent.com" onSuccess={responseGoogle} onFailure={responseGoogle} - login={"reponseType" : 'code'} cookiePolicy={'single_host_origin'} + > <span style={{textTransform:"none", fontSize:"13px"}}>Usando o Google</span> - </StyledGoogleLoginButton> - > + </StyledGoogleLoginButton>*/} + <Button onClick={handleGoogle}>login com google</Button> </div> </div>