Platform differences
The API is the same on both platforms. The underlying SDKs are not, and these differences surface to apps:
| Topic | Android | iOS |
|---|---|---|
| Sign-in SDK | Credential Manager, with scopes and server auth codes from AuthorizationClient. | Google Sign-In SDK 10.1. |
| Stored session | Keystore-encrypted storage. | Keychain. The SDK's own session is restored without UI on first token use. |
| ID token refresh | Credential 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. |
hostedDomain | Filters the account picker. | Passed to Google. |
iosClientId | Ignored. | Overrides GIDClientID. |
checkPlayServices | Rejects 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 bygetCurrentUser(). - Hosted domain: always verify the
hdclaim on your backend.