Skip to content
Snippets Groups Projects
Commit 1e3333d3 authored by Lucas Eduardo Schoenfelder's avatar Lucas Eduardo Schoenfelder
Browse files

hm

parent e9c14bbc
No related branches found
No related tags found
No related merge requests found
......@@ -69,7 +69,7 @@ export default function App(){
<Header />
<div style={{backgroundImage: "linear-gradient(to right,#ff7f00,#e81f4f,#673ab7,#00bcd4)", height:"5px"}}></div>
<Switch>
<Route path="/" exact={true} component={Home}/>
<Route path="/home" exact={true} component={Home}/>
<Route path="/busca" component={Search} />
<Route path="/perfil-atualizacoes" component={UserPage} />
<Route path="/recurso" component={ResourcePage}/>
......
......@@ -37,9 +37,17 @@ 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)})
async function handleGoogle () {
try {
const response = await axios.get('https://api.portalmec.c3sl.ufpr.br/v1/omniauth/google_oauth2?auth_origin_url=https://api.portalmectest.c3sl.ufpr.br/react/&omniauth_window_type=sameWindow&resource_class=User');
console.log(response);
const url = await response.text;
window.location.assign(url);
} catch(e) {
console.log(e)
}
}
class LoginContainer extends Component {
constructor (props) {
super(props);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment