Rips firebase_auth; auth talks directly to the new backend endpoints. Anonymous-first + phone OTP work end-to-end; Google/Apple SDKs are kept but buttons are hidden behind ENABLE_SOCIAL_AUTH until backend OAuth credentials are provisioned. Smoke-tested against the backend via curl: - anonymous → PATCH display_name → /me - OTP request (read stub code from backend log) → verify with anonymous_customer_id → same customer row preserved, display_name preserved, phone added → upgrade confirmed - refresh rotation + logout → post-logout refresh correctly fails REFRESH_INVALID - Debug APK builds clean - pubspec: drop firebase_auth; add flutter_secure_storage - core/auth/auth_bridge.dart: shared mutable state (access token + refresh callback + in-flight de-dup) — keepAlive provider - core/auth/token_storage.dart: flutter_secure_storage wrapper (customer_refresh_token key) - core/auth/social_auth_enabled.dart: const flag from --dart-define=ENABLE_SOCIAL_AUTH (default false) - core/auth/auth_notifier.dart: bootstrap via stored refresh; anonymous via /api/shared/auth/anonymous + PATCH display_name; phone OTP via /api/client/auth/*; Google + Apple wired (passes anonymous_customer_id for upgrade); anonymity config check for ForceRegister state; granular error-code mapping - core/api/api_client.dart: Bearer from bridge + postRaw(skipAuth) for auth endpoints + single-retry 401 refresh - core/chat/chat_notifier.dart + core/pairing/pairing_notifier.dart: WS auth frame reads bridge.accessToken - features/auth/screens/otp_screen.dart: verificationId → otpRequestId - features/auth/screens/register_screen.dart + force_register_screen.dart: Google/Apple buttons gated behind kSocialAuthEnabled; force_register drops obsolete linkAccount() (upgrade happens server-side now via anonymous_customer_id) - client_app/CLAUDE.md: Auth section rewritten (was stale on Firebase) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
55 lines
1.2 KiB
YAML
55 lines
1.2 KiB
YAML
name: client_app
|
|
description: Halo Bestie - Client App
|
|
|
|
publish_to: 'none'
|
|
version: 1.0.0+1
|
|
|
|
environment:
|
|
sdk: '>=3.0.0 <4.0.0'
|
|
|
|
dependencies:
|
|
flutter:
|
|
sdk: flutter
|
|
|
|
# Firebase (Messaging only — Auth dropped in Phase 3.4, self-managed JWT now)
|
|
firebase_core: ^3.12.1
|
|
firebase_messaging: ^15.2.5
|
|
|
|
# Social login (kept — activated when OAuth creds arrive; buttons hidden behind
|
|
# ENABLE_SOCIAL_AUTH dart-define flag until then)
|
|
google_sign_in: ^6.2.1
|
|
sign_in_with_apple: ^6.1.0
|
|
|
|
# HTTP & WebSocket
|
|
dio: ^5.4.3
|
|
web_socket_channel: ^3.0.3
|
|
|
|
# State management
|
|
flutter_riverpod: ^2.6.1
|
|
hooks_riverpod: ^2.6.1
|
|
riverpod_annotation: ^2.6.1
|
|
flutter_hooks: ^0.20.5
|
|
|
|
# Storage
|
|
shared_preferences: ^2.2.3 # onboarding flag, non-sensitive
|
|
flutter_secure_storage: ^9.2.2 # refresh token (encrypted)
|
|
|
|
# Navigation
|
|
go_router: ^13.2.1
|
|
flutter_local_notifications: ^21.0.0
|
|
|
|
dev_dependencies:
|
|
flutter_test:
|
|
sdk: flutter
|
|
flutter_lints: ^3.0.0
|
|
riverpod_generator: ^2.6.2
|
|
build_runner: ^2.4.13
|
|
custom_lint: ^0.7.0
|
|
riverpod_lint: ^2.6.2
|
|
|
|
flutter:
|
|
uses-material-design: true
|
|
assets:
|
|
- assets/images/
|
|
- assets/images/splash/
|