Open SultanHboush opened 2 years ago
are you using vite or create react app?
@Malankar create react app
Debuging:
Check if the name matches the name in env file First console log the env variable and see what it is giving you in the console
console.log(process.env.REACT_APP_GOOGLE_CLIENT_ID)
Alternative: For testing purpose try hard coding the value instead of referencing it via a variable because might find some other errors as well
<GoogleLogin
clientId="Your ID"
buttonText="Log in with Google"
onSuccess={handleLogin}
onFailure={handleLogin}
cookiePolicy={'single_host_origin'}
/>
@Malankar I tried it, but it gives me the same error!
I dont why i'm getting this error!
This the code:
<GoogleLogin clientId={process.env.REACT_APP_GOOGLE_CLIENT_ID} buttonText="Log in with Google" onSuccess={handleLogin} onFailure={handleLogin} cookiePolicy={'single_host_origin'} />
Please note that the button is disabled also !