anthonyjgrove / react-google-login

A React Google Login Component
https://anthonyjgrove.github.io/react-google-login
MIT License
1.85k stars 425 forks source link

popup_closed_by_user #536

Open vaibhava17 opened 2 years ago

vaibhava17 commented 2 years ago

Showing Error {error: 'popup_closed_by_user'} all the time

caotrongtin99 commented 2 years ago

I have same issue

Nases commented 2 years ago

I'm getting

"You have created a new client application that uses libraries for user authentication or authorization that will soon be deprecated. New clients must use the new libraries instead; existing clients must also migrate before these libraries are deprecated. See the Migration Guide for more information."

then

popup_closed_by_user

Yeom-JinHo commented 2 years ago

I have same issue.... help ㅠㅠㅠ

Yeom-JinHo commented 2 years ago

I solved this problem with @react-oauth/google

ezra-works commented 2 years ago

I had this problem while testing this on localhost:3000

Solved it by 1. Clearing cache

image

2. Enabling cookies for localhost:3000

image

3. Making OAuth consent screen internal ( as I'm testing local)

image
vaibhava17 commented 2 years ago

I had this problem while testing this on localhost:3000

Solved it by 1. Clearing cache image

2. Enabling cookies for localhost:3000 image

3. Making OAuth consent screen internal ( as I'm testing local) image

@ezra-moses thanks. I will try this and inform you guys

lvxhnat commented 2 years ago

I solved this problem temporarily by doing the following.

  1. npm i gapi-script
  2. Import the gapi-script package in your App.js import { gapi } from 'gapi-script';
  3. In App.js, add the following line
    gapi.load('client:auth2', () => {
    gapi.client.init({
        clientId: process.env.REACT_APP_GOOGLE_OAUTH_CLIENT_ID,
        plugin_name: 'chat',
    });
    });
abhi-qb commented 2 years ago

Having the same issue, any updates on this?

Jay-study-nildana commented 2 years ago

I solved this problem temporarily by doing the following.

  1. npm i gapi-script
  2. Import the gapi-script package in your App.js import { gapi } from 'gapi-script';
  3. In App.js, add the following line
gapi.load('client:auth2', () => {
    gapi.client.init({
        clientId: process.env.REACT_APP_GOOGLE_OAUTH_CLIENT_ID,
        plugin_name: 'chat',
    });
});

This worked for me. thank you.

jun7867 commented 2 years ago

I solved this problem temporarily by doing the following.

  1. npm i gapi-script
  2. Import the gapi-script package in your App.js import { gapi } from 'gapi-script';
  3. In App.js, add the following line
gapi.load('client:auth2', () => {
    gapi.client.init({
        clientId: process.env.REACT_APP_GOOGLE_OAUTH_CLIENT_ID,
        plugin_name: 'chat',
    });
});

Thank you!!!

itsaruproy commented 2 years ago

Found this npm package https://www.npmjs.com/package/@react-oauth/google It works and has a detailed documentation

maneesh commented 2 years ago

facing same issue. Is there any other way

Shaker-Pelcro commented 2 years ago

Same here.