Skip to main content

Platform differences

The API is the same on both platforms. The underlying SDKs are not, and these differences surface to apps:

TopicAndroidiOS
Sign-in SDKCredential Manager, with scopes and server auth codes from AuthorizationClient.Google Sign-In SDK 10.1.
Stored sessionKeystore-encrypted storage.Keychain. The SDK's own session is restored without UI on first token use.
ID token refreshCredential Manager auto sign-in: a brief "Signing in as" bar, or the account sheet. Needs the foreground.Silent, with the refresh token.
signIn()Shows accounts that already authorized the app; enableAutoSelect skips the sheet for one.Restores the previous sign-in without UI.
hostedDomainFilters the account picker.Passed to Google.
iosClientIdIgnored.Overrides GIDClientID.
checkPlayServicesRejects with PLAY_SERVICES_NOT_AVAILABLE, showing the fix-up dialog by default.Always resolves.

Notes​

  • Stored session: getCurrentUser() returns the session right after launch on both platforms, offline too.
  • ID tokens on Android: Credential Manager is the only current Android API that issues Google ID tokens, and only through a sign-in; Android apps never get a refresh token. See Tokens and sessions.
  • Server auth codes are one-time on both platforms. They are returned only by interactive sign-in and requestScopes, and never by getCurrentUser().
  • Hosted domain: always verify the hd claim on your backend.