I'm using react-google-login to login users using their Google account. When they finish logging in and being redirected to back i get an error in the console.
{error: 'popup_closed_by_user'}
This is my functions Below :
const onSuccess = (response) => {
console.log('Login Successful', response)
}
const onFailure = (response) => {
console.log('Login Failed', response)
}
My Google Button
<GoogleLogin
clientId={clientId}
render={renderProps => (
<button onClick={renderProps.onClick} disabled=
{renderProps.disabled} className="btn mt-5 btn-google btn-user btn-block">
<AiOutlineGoogle className='scIcons inline' /> Login with Google
</button>
)}
buttonText="Login"
onSuccess={onSuccess}
onFailure={onFailure}
cookiePolicy={'single_host_origin'}
isSignedIn={true}
/>
Please I need help with this.