Implement Google->Firebase->Backend auth flow

- Add authGoogleNew GraphQL mutation and token exchange in AuthServiceImpl
- Add ApiTokenStore and SharedPreferencesApiTokenStore for API token persistence
- Add ApolloAuthInterceptor to inject Bearer token on GraphQL requests
- Introduce FirebaseSessionManager for testable Firebase auth orchestration
- Update LoginViewModel to surface backend auth errors
- Add unit tests for Firebase failure, backend failure, and auth state

Made-with: Cursor
This commit is contained in:
2026-03-02 20:19:54 +01:00
parent 436e165679
commit 31f723cbd6
12 changed files with 297 additions and 39 deletions

View File

@@ -22,6 +22,8 @@ ksp = "2.0.21-1.0.27"
google-services = "4.4.4"
androidxCredentials = "1.5.0"
googleid = "1.1.1"
kotlinxCoroutinesTest = "1.9.0"
mockk = "1.13.13"
[libraries]
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
@@ -55,6 +57,8 @@ androidx-hilt-navigation-compose = { group = "androidx.hilt", name = "hilt-navig
androidx-credentials = { group = "androidx.credentials", name = "credentials", version.ref = "androidxCredentials" }
androidx-credentials-play-services-auth = { group = "androidx.credentials", name = "credentials-play-services-auth", version.ref = "androidxCredentials" }
googleid = { group = "com.google.android.libraries.identity.googleid", name = "googleid", version.ref = "googleid" }
kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "kotlinxCoroutinesTest" }
mockk-jvm = { group = "io.mockk", name = "mockk-jvm", version.ref = "mockk" }
[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }