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:
@@ -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)
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user