title: How to extend permission scope GTMOAuth2ViewControllerTouch
body: <p>I have an application which is using <code>GTMOAuth2ViewControllerTouch</code> to do the login.</p>
  
  <p>Initially the scope was just using <code>https://www.googleapis.com/auth/userinfo.email</code>, so the user is already logged in with this permission.</p>
  
  <p>I want to ask for new permissions for <code>https://www.googleapis.com/auth/calendar</code></p>
  
  <p>So when it retrieves the auth object from the keychain:</p>
  
  <pre><code>GTMOAuth2Authentication *auth = [GTMOAuth2ViewControllerTouch authForGoogleFromKeychainForName:keychainItemName
                                                                                                clientID:clientID
                                                                                            clientSecret:clientSecret];
  </code></pre>
  
  <p>and this new permission is not in the scope of the <code>auth</code> object, I try to present again the <code>GTMOAuth2ViewControllerTouch</code> to extend the scope, but it requires the user to enter credentials again.</p>
  
  <p>I would expect this controller to just ask for the approval of this new permission.</p>
  
  <p>How can I achieve this behaviour? Is it possible with the <a href="https://github.com/google/google-api-objectivec-client/wiki" rel="nofollow">google-api-objectivec-client</a></p>
  
  <p>UPDATE:</p>
  
  <p>I have been able to get closer by using <code>GTMOAuth2ViewControllerTouch</code>'s <code>swapInCookies</code> &amp; <code>swapOutCookies</code> methods..</p>
  
  <p>For a new installation, these methods would open again the same controller (webview for signing in) and the second time it just asks for permissions, keeping the user away from entering his credentials again.</p>
  
  <p>But the problem now is that the current app, doesn´t <code>swapOutCookies</code> when the login is completed, so there are no cookies to be swapped into the webview, so it asks for login, when the user was supposed to be already logged in.</p>