Native app is a public client using system browser/Custom Tab, Authorization Code + S256 PKCE, exact verified redirect, state, and OIDC nonce.
Maintained library validates issuer metadata and ID-token signature/issuer/audience/time/nonce; iss + sub identifies account.
Access tokens stay short-lived and audience-scoped; refresh token is protected locally and rotated server-side.
Account-scoped token repository and request tags prevent cross-account retries.
OkHttp attaches token only to trusted API hosts; one single-flight refresh occurs, with bounded one-time retry.
Server authorizes every account/object/action and binds high-value step-up challenge to exact transaction details.
Biometric authorizes a Keystore operation/local presence gate; it never substitutes for server authorization.
Logout blocks new work, revokes when possible, removes local credentials, cancels account jobs, cleans caches/notifications/cookies/analytics, and recovers after process death.
OAuth versus OIDC? OAuth delegates resource access; OIDC adds standardized user authentication/identity claims.
Why is Android a public client? Installed app binaries cannot keep a shared client secret confidential.
Why external browser instead of WebView? It isolates provider credentials/content from the app and supports browser SSO/security context.
What does PKCE protect? Intercepted authorization code cannot be redeemed without the per-request verifier.
state versus nonce versus PKCE? Response/CSRF correlation, ID-token replay/request binding, and code-redemption binding respectively.
Can ID token call an API? It is for the client’s identity assertion; APIs normally require an access token with correct audience/scope.
Why rotate refresh tokens? Reuse of an invalidated prior token can reveal theft and revoke the token family/session.
How prevent refresh storm? One per-session single-flight refresh; compare failed/latest token; waiters reuse result; retry once.
Refresh every 401? No. Wrong audience/scope/revocation/business auth may not be fixed; honor error contract and bound retries.
Where store tokens? Minimize access-token persistence; protect refresh credential with platform security while relying on server expiry/rotation/revocation because client compromise remains possible.
Does biometric mean account owner approved? It proves an allowed local device authenticator succeeded, not remote identity/authorization or exact transaction unless cryptographically bound.
Logout versus deleting token? Logout spans server revocation, local credential/data/work/cookie/notification/analytics cleanup and crash/offline recovery.
Authentication versus authorization? Who/session identity versus permission for this action/resource under current policy.
Why are UUID object IDs insufficient? Unpredictability reduces guessing; only server object-level authorization prevents access.