Skip to content

Instantly share code, notes, and snippets.

@anton-matosov
Created April 16, 2025 00:59
Show Gist options
  • Save anton-matosov/ce55e1b3b0debf19fd844c4dc1484e47 to your computer and use it in GitHub Desktop.
Save anton-matosov/ce55e1b3b0debf19fd844c4dc1484e47 to your computer and use it in GitHub Desktop.

Revisions

  1. anton-matosov created this gist Apr 16, 2025.
    37 changes: 37 additions & 0 deletions google.provider
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,37 @@
    <?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>