<?xml version="1.0" encoding="UTF-8"?>
<provider id="google-gmail">
  <_name>GMail</_name>
  <!-- Tooltip text appearing over the button to create this type of account -->
  <_description>Gmail Feed</_description>
  <icon>gmailfeed</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&amp;approval_prompt=force</setting>
          <setting name="TokenPath">o/oauth2/token</setting>
          <setting name="RedirectUri">http://localhost/oauth2callback</setting>
          <!-- HACK: access_type is non standard, but Google requires it in
               order to return a refresh token -->
          <setting name="ResponseType">code</setting>
          <setting name="Scope" type="as">[
              'https://mail.google.com/mail/feed/atom'
          ]</setting>
          <setting name="AllowedSchemes" type="as">['https','http']</setting>
          <setting name="ClientId">722576520700-s76fk9s03goef1qcjqq4i290rsdinc3o.apps.googleusercontent.com</setting>
          <setting name="ClientSecret">smhBM_JqEZHAZZlYrVtO7ZnP</setting>
          <setting name="ForceClientAuthViaRequestBody" type="b">true</setting>
        </group>
      </group>
    </group>
  </template>
</provider>