Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

details: "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](https://developers.google.com/identity/gsi/web/guides/gis-migration) for more information." error: "idpiframe_initialization_failed #78

Open
Huucong95 opened this issue Jun 2, 2022 · 31 comments
Assignees

Comments

@Huucong95
Copy link

image

@Huucong95
Copy link
Author

image

@Huucong95 Huucong95 changed the title how to fix . nuxt 2 details: "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](https://developers.google.com/identity/gsi/web/guides/gis-migration) for more information." error: "idpiframe_initialization_failed Jun 2, 2022
@ahmedemarasure
Copy link

Please fix, this is urgent problem

@felipe1181
Copy link

fix it please

@Luschor
Copy link

Luschor commented Jun 26, 2022

Please fix it

@MartensCedric
Copy link

please fix it

@SgtChrome
Copy link
Contributor

I am not sure, but doesn't #72 fix this?

@Luschor
Copy link

Luschor commented Aug 2, 2022

I am not sure, but doesn't #72 fix this?

Your fix is for python backend example. We need fix for Vue part.

@diakonovm
Copy link

Does anyone have a fix for this?

@Luschor
Copy link

Luschor commented Sep 9, 2022

Does anyone have a fix for this?

Still no solution.

@tilenpirih
Copy link

Fix please

@Mudy7
Copy link

Mudy7 commented Oct 2, 2022

please fix

@johnnative
Copy link

Please fix

2 similar comments
@LeandroRM
Copy link

Please fix

@toct92
Copy link

toct92 commented Oct 16, 2022

Please fix

@Luschor
Copy link

Luschor commented Oct 16, 2022

If somebody only needs to get an auth code from google, here is a little workaround for a new google SDK implementation that works without plugin:

  • load google script in head:
    script: [
      { src: 'https://accounts.google.com/gsi/client', async: true, defer: true }
    ]
  • call google function on button click:
    yourFunction(){
      const client = google.accounts.oauth2.initCodeClient({
        client_id: 'YOUR_GOOGLE_CLIENT_ID',
        scope: 'https://www.googleapis.com/auth/userinfo.profile',
        ux_mode: 'popup',
        callback: (response) => {
          if(response.code){
            console.log(response.code)
          }
        },
      });
      client.requestCode();
    }
  • similar solution for getting an access token:
yourFunction(){
  const client = google.accounts.oauth2.initTokenClient({
    client_id: 'YOUR_GOOGLE_CLIENT_ID',
    scope: 'https://www.googleapis.com/auth/userinfo.profile',
    callback: (response) => {
      ...
    },
  });
 }

@shashankgaurav17
Copy link

Temporary fix for this is to add plugin_name to the config params

window.gapi.client
        .init({
          clientId:'Your Client ID',
          scope: "email",
          plugin_name:'App Name that you used in google developer console API'
        })

By default, new client IDs are now blocked from using the older platform library; existing client IDs are unaffected. New client IDs created before July 29th, 2022 may set the plugin_name to enable use of the legacy Google platform library.

@sunjianbo945
Copy link

Does anyone have a fix for this?

@pmadrigal95
Copy link

Hi,

Any update?
I have the same issue :(

@shumail786-hash
Copy link

Any solution??????
I have the same issue :(

@katana9108
Copy link

it is a horror...
Any solution?

@NyllRE
Copy link

NyllRE commented Jan 9, 2023

@Luschor

If somebody only needs to get an auth code from google, here is a little workaround for a new google SDK implementation that works without plugin:...

same error :/
image

@Luschor
Copy link

Luschor commented Jan 10, 2023

@Luschor

If somebody only needs to get an auth code from google, here is a little workaround for a new google SDK implementation that works without plugin:...

same error :/ image

You have to deactivate this plugin and use only my workaround.

@guruahn
Copy link
Owner

guruahn commented Jan 25, 2023

Thanks for your comments.
We will review and work on the change as soon as possible.

@NyllRE
Copy link

NyllRE commented Jan 25, 2023

@Luschor
You have to deactivate this plugin and use only my workaround.

I forgot to tell you that this workaround did work, thanks!

I just wanted to ask about something else, is there a way to get the mobile app prompt? like when you try to sign in with google on a mobile app using something like Ionic. I don't think it's the best UX to transfer to a web page to sign in with google but all the answers were using java and I'm not experienced with java tbh

@zhoudc1995
Copy link

Thanks for your comments. We will review and work on the change as soon as possible.

Please let me know after the modification is completed, thank you

@Luschor
Copy link

Luschor commented Jan 31, 2023

@NyllRE You probably want redirect mode instead popup window. So you need to use this function:

const client = google.accounts.oauth2.initCodeClient({
  client_id: 'YOUR_GOOGLE_CLIENT_ID',
  scope: 'https://www.googleapis.com/auth/userinfo.profile',
  ux_mode: 'redirect',
  redirect_uri: "https://your.domain/code_callback_endpoint",
  state: "YOUR_BINDING_VALUE"
});

More info here - https://developers.google.com/identity/oauth2/web/guides/use-code-model#redirect-mode

@sadortun
Copy link

@Luschor did you find a way to get the ID Token instead of the accessToken?

@Luschor
Copy link

Luschor commented Feb 12, 2023

@sadortun I think that GIS only returns an access token and auth code not ID token. Look here.

@sadortun
Copy link

sadortun commented Feb 12, 2023

@Luschor thanks,

The paragraph just above your link was exactly what I was looking for

Authentication only scopes
Several scopes are used only for user authentication: email, profile, and openid. If your app only uses these scopes, consider if a JWT ID Token and Sign In With Google for user sign-up and sign-in meets your needs. In most cases, this is the most straightforward and simple method available for user authentication.


EDIT

For those who are still looking. If you need the ID Token (JWT Token)

Add <script src="https://accounts.google.com/gsi/client" async defer></script>

      // https://developers.google.com/identity/gsi/web/reference/js-reference?hl=fr#CredentialResponse

        google.accounts.id.initialize({
          client_id: 'CLIENT_ID',

          callback: response => {
                    const token = JSON.parse(atob(response.credential.split('.')[1]));
                   // ...
          },
        });
        google.accounts.id.prompt();

@guruahn
Copy link
Owner

guruahn commented Feb 17, 2023

This plugin does not support the new Google authentication system(GIS).
You need to migrate by referring to this document.
I'm sorry to tell you this news.

@Zukhriddinbek-Code
Copy link

I am using react-google-login and having the same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.