Google blocks access from dolphin/kio-gdrive

Hello,

Trying to access google drive from dolphin (arch linux). After entering google account password and confirming on my cellphone, an error message is displayed:

This app is blocked
This app tried to access sensitive info in your Google Account. To keep your account safe, Google blocked this access.

Any clue on how to fix this?

TIA

1 Like

Hi - there’s an existing thread on this topic where someone has figured out a temporary workaround:

And an existing bug report for the topic: 480779 – Can not add Google to Online Accounts anymore using a recent version of signon-ui

Basically, looks like a new client ID will need to be figured out to be used by Plasma’s Online Accounts feature going forward, but there are workarounds possible in the meantime if needed.

Hope that helps,

1 Like

Took some time but there’s a solution. In the file:

/usr/share/accounts/providers/kde/google.provider

the line:

<setting name="AuthPath">o/oauth2/auth?access_type=offline</setting>

Should be replaced with:

<setting name="AuthPath">o/oauth2/auth?access_type=offline&amp;approval_prompt=force</setting>

Found this on redit under r/kde but can’t post the link here.

HTH

Hi, mine is exactly like this by default, but it still blocks me from login.

This is the new file I use:

<?xml version="1.0" encoding="UTF-8"?>
<provider id="google">
  <name>Google</name>

  <description>GNOME-ID, Google Drive and YouTube</description>
  <icon>im-google</icon>
  <translations>kaccounts-providers</translations>
  <domains>.*google\.com</domains>

  <template>
    <group name="auth">
      <setting name="method">oauth2</setting>
      <setting name="mechanism">web_server</setting>
      <group name="oauth2">
        <group name="web_server">
          <setting name="Host">accounts.google.com</setting>
          <setting name="AuthPath">o/oauth2/auth?access_type=offline</setting>
          <setting name="TokenPath">o/oauth2/token</setting>
          <setting name="RedirectUri">http://localhost/oauth2callback</setting>

          <setting name="ResponseType">code</setting>
          <setting type="as" name="Scope">[
              'https://www.googleapis.com/auth/userinfo.email',
              'https://www.googleapis.com/auth/userinfo.profile',
              'https://www.googleapis.com/auth/calendar',
              'https://www.googleapis.com/auth/tasks',
              'https://www.googleapis.com/auth/drive'
          ]</setting>
          <setting type="as" name="AllowedSchemes">['https']</setting>
          <setting name="ClientId">44438659992-7kgjeitenc16ssihbtdjbgguch7ju55s.apps.googleusercontent.com</setting>
          <setting name="ClientSecret">-gMLuQyDiI0XrQS_vx_mhuYF</setting>
          <setting type="b" name="ForceClientAuthViaRequestBody">true</setting>
        </group>
      </group>
    </group>
  </template>
</provider>

This is the reddit post:

https://www.reddit.com/r/kde/comments/1hq9x5o/temporary_workaround_for_google_online_accounts/

At this time, the relevant information on the issue of Google Drive integration in KDE products is in these bug report comments:

Thats my Reddit Post lol.

1 Like

After the latest update in manjaro plasma, kio-gdrive 24.12.2-1 i can make an online account with google. But still no access to gdrive in dolphin. Acces denied warning

Hi - Drive access is no longer requested by the KDE Online Accounts function when signing in to a Google account. Quoting from the commit message included in bug report comment 54, linked above:

Google blocked us from using this back in June because we weren’t able
justify our API usage to their satisfaction. As such, the permission is
now blocked, and including it here prevents people from logging into
their Google accounts for any other purposes, making 25% of the
KAccounts KCM non-functional. Remove the gdrive permissions for now so at least other Google things can work (at least in theory).