Auth · Kotlin Conformance
This page tracks an integration contract: unchanged Firebase code run through a Pyric runtime seam, so there is no separate Firebase public API to measure. The rows below are its signed behavior inventory.
Compatibility reference for Pyric’s pure-Kotlin client conforming to com.google.firebase.auth (Firebase Android SDK) via the Pyric WebSocket bridge.
All rows are backed by the containerized and local test suite (packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt) executed via the automated CDD climb lane (scripts/run-kotlin-auth-conformance.sh).
FirebaseAuth — instance & lifecycle
FirebaseAuth.getInstance() / Firebase.authReturns the default FirebaseAuth instance for the default FirebaseApp.
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#1.FirebaseAuth.getInstance(app) / Firebase.auth(app)Provides isolated FirebaseAuth instances distinguished by FirebaseApp.
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#2.FirebaseAuth.appReturns the FirebaseApp instance associated with this FirebaseAuth instance.
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#3.FirebaseAuth.tenantIdConfigures and retrieves the tenant ID, updating the active AuthLens to include tenant scope.
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#4.FirebaseAuth.clearInstancesForTest()Clears cached FirebaseAuth instances to isolate test runs.
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#5.FirebaseAuth — authentication operations
FirebaseAuth.signInWithEmailAndPassword(email, password)Authenticates a user with email and password via bridge auth.signInEmail, updating currentUser and AuthLens.
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#6.FirebaseAuth.createUserWithEmailAndPassword(email, password)Creates a new user account with email and password via bridge auth.createUser, updating currentUser and AuthLens.
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#7.FirebaseAuth.signInAnonymously()Authenticates an anonymous user via bridge auth.signInAnonymously, establishing an anonymous FirebaseUser session.
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#8.FirebaseAuth.signOut()Signs out the current user via bridge auth.signOut, clearing currentUser and resetting AuthLens to Anon.
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#9.FirebaseAuth.currentUserReturns the currently signed-in FirebaseUser, or null if unauthenticated.
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#10.FirebaseAuth — state observers & modern flows
FirebaseAuth.authStateFlow()Exposes a Coroutine StateFlow emitting the active FirebaseUser on sign-in, sign-out, or user change.
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#11.FirebaseAuth.idTokenFlow()Exposes a Coroutine Flow emitting the active FirebaseUser on token refresh, user change, or claims update.
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#12.FirebaseAuth.addAuthStateListener(listener)Registers an AuthStateListener invoked immediately on registration and whenever authentication state changes.
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#13.FirebaseAuth.addIdTokenListener(listener)Registers an IdTokenListener invoked immediately on registration and whenever token or claims change.
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#14.FirebaseUser — user identity & properties
FirebaseUser.uidReturns the non-null string uniquely identifying the user across providers.
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#15.FirebaseUser.emailReturns the primary email address for the user, or null for anonymous users.
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#16.FirebaseUser.displayNameReturns the display name associated with the user profile, or null if unset.
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#17.FirebaseUser.photoUrlReturns the profile photo URI or null if unset.
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#18.FirebaseUser.phoneNumberReturns the phone number string associated with the user profile, or null if unset.
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#19.FirebaseUser.isAnonymousReturns true if the user account is authenticated anonymously, false otherwise.
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#20.FirebaseUser.isEmailVerifiedReturns true if the user email has been verified, false otherwise.
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#21.FirebaseUser.providerIdReturns the primary provider identifier ("firebase").
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#22.FirebaseUser.providerDataReturns a list of UserInfo instances corresponding to linked provider accounts.
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#23.FirebaseUser.customClaimsReturns a map of custom claims associated with the user and carried into AuthLens.
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#24.FirebaseUser — token & profile operations
FirebaseUser.getIdToken(forceRefresh)Retrieves the JWT ID token string, forcing refresh via bridge auth.getIdTokenResult when forceRefresh is true.
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#25.FirebaseUser.getIdTokenResult(forceRefresh)Retrieves GetTokenResult with parsed JWT token string, claims map, expiration, and provider info.
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#26.FirebaseUser.updateProfile(request)Mutates user display name and photo URI via bridge auth.updateProfile, updating local user state.
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#27.FirebaseUser.reload()Reloads user profile and custom claims from bridge auth.getCurrentUser and auth.getIdTokenResult.
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#28.UserProfileChangeRequest — profile mutation builder
UserProfileChangeRequest.BuilderBuilds immutable UserProfileChangeRequest configuring displayName and photoUri.
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#29.Data models & exception handling
AuthResult / AdditionalUserInfoAuthResult packages authenticated FirebaseUser and AdditionalUserInfo (providerId, isNewUser).
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#30.GetTokenResultEncapsulates token string, custom claims, expirationTimestamp, authTimestamp, and issuedAtTimestamp.
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#31.FirebaseAuthExceptionTranslates bridge auth error codes into standard Firebase error codes (e.g. ERROR_WRONG_PASSWORD, ERROR_USER_NOT_FOUND).
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#32.CredentialsProvider & Firestore Auth Coupling
CredentialsProvider.getEffectiveLens()Provides AuthLens.Anon when signed out, and AuthLens.AsUser with uid, claims, and tenant when signed in.
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#33.CredentialsProvider.authLensFlowEmits updated AuthLens on authentication state transitions (sign-in, sign-out, token refresh, tenant change).
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#34.FirebaseFirestore actAs stampingFirebaseFirestore automatically stamps the CredentialsProvider effective AuthLens on all document operations and queries.
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#35.FirebaseFirestore snapshot re-subscriptionActive Firestore snapshots() flows automatically re-subscribe when CredentialsProvider emits a new AuthLens.
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#36.OAuth providers & credential authentication
GoogleAuthProvider.getCredential(idToken, accessToken)Creates an AuthCredential for Google Sign-In ("google.com") encapsulating the ID token and/or access token.
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#37.OAuthProvider.getCredential(providerId, idToken, accessToken)Creates an OAuthCredential for a generic OAuth provider (e.g. "apple.com", "github.com") encapsulating providerId, idToken, accessToken, and rawNonce.
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#38.FirebaseAuth.signInWithCredential(credential)Authenticates a user with an OAuth/Google AuthCredential via bridge auth.signInWithCredential RPC, updating currentUser, providerData, and AuthLens.
com.google.firebase.auth specification. Test:
packages/kt-client/src/test/kotlin/dev/pyric/auth/ConformanceTest.kt assertion set auth-kotlin#39.