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

@@ -78,7 +78,12 @@ class LoginViewModel @Inject constructor(
if (signInResult.isSuccess) {
_actions.tryEmit(Action.OpenManage)
} else {
_actions.tryEmit(Action.ShowMessage(appContext.getString(R.string.toast_oauth_failed)))
val message = signInResult.exceptionOrNull()?.message
_actions.tryEmit(
Action.ShowMessage(
message ?: appContext.getString(R.string.toast_oauth_failed)
)
)
}
}
}