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

bc

parent 3caee1e6
Branches
No related tags found
No related merge requests found
...@@ -18,6 +18,7 @@ along with Plataforma Integrada MEC. If not, see <http://www.gnu.org/licenses/> ...@@ -18,6 +18,7 @@ along with Plataforma Integrada MEC. If not, see <http://www.gnu.org/licenses/>
import React, {Component} from "react"; import React, {Component} from "react";
import GoogleLogin from 'react-google-login' import GoogleLogin from 'react-google-login'
import { Button } from '@material-ui/core'; import { Button } from '@material-ui/core';
import MeuBotaoGoogle from './MeuBotaoGoogle'
//import FacebookLogin from 'react-facebook-login'; //import FacebookLogin from 'react-facebook-login';
import CloseIcon from '@material-ui/icons/Close'; import CloseIcon from '@material-ui/icons/Close';
import styled from 'styled-components' import styled from 'styled-components'
...@@ -89,15 +90,16 @@ class LoginContainer extends Component { ...@@ -89,15 +90,16 @@ class LoginContainer extends Component {
<div style={{paddingTop: "20px"}}> <div style={{paddingTop: "20px"}}>
<div style={{marginTop:"0"}}> <div style={{marginTop:"0"}}>
<StyledGoogleLoginButton {/*<StyledGoogleLoginButton
clientId="288460085642-k4veg4fo8kddvjer8b055n9da5qtgha7.apps.googleusercontent.com" clientId="288460085642-k4veg4fo8kddvjer8b055n9da5qtgha7.apps.googleusercontent.com"
onSuccess={responseGoogle} onSuccess={responseGoogle}
onFailure={responseGoogle} onFailure={responseGoogle}
login={"reponseType" : 'code'} login={"reponseType" : 'code'}
cookiePolicy={'single_host_origin'} cookiePolicy={'single_host_origin'}
>
<span style={{textTransform:"none", fontSize:"13px"}}>Usando o Google</span> <span style={{textTransform:"none", fontSize:"13px"}}>Usando o Google</span>
</StyledGoogleLoginButton> </StyledGoogleLoginButton>
>*/}
<MeuBotaoGoogle/>
</div> </div>
</div> </div>
...@@ -210,7 +212,7 @@ const LeftSideStrikedH3 = styled.div` ...@@ -210,7 +212,7 @@ const LeftSideStrikedH3 = styled.div`
margin-left : 5px; margin-left : 5px;
width : 45%; width : 45%;
` `
const StyledGoogleLoginButton = styled(GoogleLogin)` export const StyledGoogleLoginButton = styled(GoogleLogin)`
background-color: fff; background-color: fff;
border : 1px solid rgb(66, 133, 244); border : 1px solid rgb(66, 133, 244);
box-shadow: 0 0 0 1px #4285f4 !important; box-shadow: 0 0 0 1px #4285f4 !important;
......
import React, {useState} from 'react'
import { Button } from '@material-ui/core';
import {StyledGoogleLoginButton} from './LoginContainer'
import axios from 'axios'
import {apiUrl} from '../env';
export default function MeuBotaoGoogle (props) {
const handleAuthentication = () => {
axios.get('https://accounts.google.com/o/oauth2/v2/auth?scope=openid%20profile%20email&redirect_uri=http://api.portalmec.c3sl.ufpr.br/v1/omniauth/google_oauth/callback&reponse_type=token&client_id=288460085642-k4veg4fo8kddvjer8b055n9da5qtgha7.apps.googleusercontent.com').then(
(response) => console.log(response),
(error) => console.log(error),
)
}
return(
<Button onClick={handleAuthentication}>Entrar com o Google</Button>
)
}
...@@ -22,7 +22,7 @@ export const Store = React.createContext() ...@@ -22,7 +22,7 @@ export const Store = React.createContext()
const initialState = { const initialState = {
searchOpen: false, searchOpen: false,
userIsLoggedIn : true, userIsLoggedIn : false,
userAgreedToPublicationTerms: false, userAgreedToPublicationTerms: false,
userAgreedToPublicationPermissions: false, userAgreedToPublicationPermissions: false,
modalColaborarPlataformaOpen : false, modalColaborarPlataformaOpen : false,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment