cuongdevjs / reactjs-social-login

Group Hook ReactJS components for login social network
https://react-social-login.netlify.app
MIT License
172 stars 76 forks source link

Google login not working #128

Closed Naveen-ecrubit closed 1 year ago

Naveen-ecrubit commented 1 year ago

The client id is always undefined(it is getting printed in console) for google login. Its was working till yesterday. But from today, I am not able to login with google since I am getting error in console as below attached image. Kindly provide a fix for this.

Screenshot_1

cuongdevjs commented 1 year ago

please give me your code.

cuongdevjs commented 1 year ago

have you tried installing the latest version?

Naveen-ecrubit commented 1 year ago

please give me your code.

@cuongdevjs This is my code.

<LoginSocialGoogle client_id={"7134490-h****bnjkdj898989dh732uln.apps.googleusercontent.com"} discoveryDocs="claims_supported" scope="email profile" access_type="offline" onResolve={({ provider, data }) => { console.log("data", data) loginUser(data) }} onReject={({ error }) => { notify(); }}

Naveen-ecrubit commented 1 year ago

have you tried installing the latest version?

No I am currently using version 2.6.2 only. @cuongdevjs

cuongdevjs commented 1 year ago

Try to upgrade to 2.6.3 and try again.

Naveen-ecrubit commented 1 year ago

It is working now @cuongdevjs with the version 2.6.2 itself. I was using the LoginSocialGoogle component at two places in the code for mobile view and desktop view seperately. I removed one and checked now. It is working.

We cant use it at multiple places or we can use it ? @cuongdevjs

Btw, Thanks for the reply.

cuongdevjs commented 1 year ago

sorry, but it is impossible right now. I'll catch this case in the future