Reputation: 920
I am writing an APP where students can login using goole+. I followed GOOGLE Developer and successfully logged in and obtained the user profile information. Now I am trying to logout. I deleted the Application, signed out of all google accounts on safari , iPhone , cleared cookies, history logged in with a different google id but even after all the steps I am getting a refresh Token from google and it is returning me the same user profile with which I logged in of the first time. I know it has an expiration time but I wondering is there no ways to log out of it before the accessToekn expires on its own.
Upvotes: 1
Views: 2639
Reputation: 7
(Sometimes I wonder if anyone reads these posts before they answer)
To log out, in Google+ on IOS (Iphone, IPad, etc.), in G+ got to settings (Google+ settings, NOT device settings) and select SIGN OUT. That simple.
Upvotes: -1
Reputation: 2176
First, are you using the Google+ Platform iOS SDK? https://developers.google.com/+/mobile/ios/ This is your best resource for iOS development with the Google+ Platform API.
Then you'll have access to functions such as signOut
https://developers.google.com/+/mobile/ios/api/interface_google_plus_sign_in, which clears out the OAuth 2.0 token from the keychain.
Upvotes: 2