3

The following is a real-world example - I'm not an iOS developer, so I am trying to understand how this can be possible:

  1. Create a new, test Google account and when done, create a test Apple ID.

  2. Set up an iOS device, and at the stage where you are asked to enter the details to log into an Apple ID, choose to skip this for now.

  3. When taken to Springboard, launch the App Store, and search for "Assistant". Tap the "Get" button, at which time you will be asked to log into the iTunes Store. Do this by entering the details for the just-created Apple ID, at which point the app will begin to download. Note that we have in no way logged into iCloud, and that we have just logged into the iTunes store for the purpose of downloading the app.

  4. When the app has finished downloading, launch it and when asked to sign in, enter the details for the new Google account (created in step 1). You should now be signed into the Assistant app.

  5. Go back to the Home screen, and remove the Assistant app; confirm when prompted so that it will be removed from the device.

  6. Now, go back to the App Store, and search for "Gmail". Choose to download this - you shouldn't be prompted to log into an Apple ID, because iOS has saved the details when Assistant was downloaded.

  7. Launch the app, and tap the "Sign In" button. Notice that the previously-entered Google account is listed - this will match the one used to sign into Assistant. Tapping on this account will allow you to access Gmail with those details, without being prompted to enter a password of any kind whatsoever.

For me, the most interesting aspect of this is that even after the Assistant app is removed, the details for the Google account entered into the app before being uninstalled are still remembered. I haven't been able to figure out how this is done; it can't be iCloud (because it wasn't enabled at the time of the initial installation of Assistant). Does anybody know how it's possible that even after an app is uninstalled, another app is able to read data previously written to memory by a separate app?

1
  • 1
    Assistant and Gmail are both owned by Google. They might appear to be seperate apps to you but all Google apps know when you've signed into one of their apps on your device. Google can store the credentials in Keychain or on their own servers. When you log into one of their apps, it does a lookup to see if you've already logged in to a Google product. If so, it uses those credentials.
    – fsb
    Commented Apr 11, 2019 at 13:22

1 Answer 1

2

The login information is securely store in the iOS keychain subsystem. Unlike macOS, keychain in iOS is not user accessible. However, apps can programmatically store and query for data in keychain.

Google developed apps look for pre-existing user information in the iOS keychain when installed. The login information is not removed from the device unless you choose to remove the account from your device from within one of the installed app.

iOS keychain provides a secure cryptographic disk store which is locked when the device is locked and unlocked when the device is unlocked. An app can access only its own keychain items, or those shared with a group to which the app belongs. Apps from the same developer, such as Google in this case, fall under same group (via common Bundle Identifier component) and this lets them share a secret via keychain.

5
  • Thank you for this - is there no way for a user to remove the content of their Keychain, other than by restoreing the iOS device?
    – elliott94
    Commented Apr 11, 2019 at 14:17
  • 1
    Are you concerned only about removing Google’s login information or about other apps storing login information as well? It would help if you can describe your problem scenario and put that as a separate question.
    – Nimesh Neema
    Commented Apr 11, 2019 at 14:21
  • Now that I understand that the Keychain is the reason for this, my overarching question: are Keychain items for apps removed upon the removal of the app in question?
    – elliott94
    Commented Apr 11, 2019 at 19:54
  • @elliott94 Depends on how the app is implemented by the developer. Either of the scenarios are possible.
    – Nimesh Neema
    Commented Apr 11, 2019 at 20:01
  • 1
    Developers could store that in their cloud and could also store it in iCloud storage assigned to a group. The keychain is one logical place to store this, but there are several other options as well.
    – bmike
    Commented Apr 21, 2019 at 14:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .