diff --git a/src/Components/LoginContainer.js b/src/Components/LoginContainer.js index 0f285b044a8b702c0a4a7b6921d3c3f39d7fd976..cb301b2ab8039ef28bb3f204f393d7450bdc3673 100644 --- a/src/Components/LoginContainer.js +++ b/src/Components/LoginContainer.js @@ -29,7 +29,9 @@ import {apiUrl} from '../env'; //arrumar isso const responseGoogle = (response) => { console.log(response); - axios.post((`${apiUrl}/auth/validate_token`), response).then( + let currUrl = window.location.href + console.log(currUrl) + axios.post((`${apiUrl}/auth/google_oauth2?auth_origin_url=` + currUrl + '&omniauth_window_type=sameWindow'), response).then( (response) => {console.log(response.data)}, (error) => {console.log(error)} )