I have an app that has the ability to connect to a users gmail account, and a separate feature that allows a user to connect to their google calendar. because these features are separate, if a user is connecting their email, I do not pass the calendar scope, and vice versa.
Lets say that a user connect their gmail, logs in successfully, goes about their business. Now, within their active session, the user now wants to connect their calendar. This will require an update in the scopes allowed for the access token that the user is currently using.
Ideally, what I would like to happen is a user clicks "connect calendar", I present the GTMOAuth2ViewControllerTouch with the users credentials already logged in, and simply have the "BUSINESS APP wants to get access to...." "Allow" or "Cancel". However, what is currently happening is that the controller presents itself without any of the credentials cached, and the user has to enter in the username and password again. Is this expected with how I described my situation?
I am currently NOT saving the authentication information into the keychain, is this something that would help with this problem? I tried using the keychain but it did the same thing, do I have to do something with the keychain before hand?
Does it have nothing to do with the keychain but with the web views cookie policy? what should the policy be set as to make sure that the user doesn't have to re-enter their credentials.
Thanks so much!