feat: Integrate Firebase Authentication and Firestore

- Added Firebase configuration to Android and iOS projects.
- Created `google-services.json` and `GoogleService-Info.plist` for Firebase setup.
- Implemented `AuthService` for handling user authentication with Firebase.
- Updated `UserProvider` to manage user data with Firestore.
- Refactored `ProfileContent`, `LoginPage`, and `SignUpPage` to use the new authentication service.
- Removed the old `UserService` and replaced it with Firestore-based user management.
- Added Firebase options in `firebase_options.dart` for platform-specific configurations.
- Updated dependencies in `pubspec.yaml` for Firebase packages.
This commit is contained in:
Dayron
2025-10-06 18:57:30 +02:00
parent 0b9a140620
commit ec0bc59a70
16 changed files with 609 additions and 374 deletions

View File

@@ -1,5 +1,8 @@
plugins {
id("com.android.application")
// START: FlutterFire Configuration
id("com.google.gms.google-services")
// END: FlutterFire Configuration
id("kotlin-android")
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id("dev.flutter.flutter-gradle-plugin")

View File

@@ -0,0 +1,54 @@
{
"project_info": {
"project_number": "521527250907",
"project_id": "travelmate-a47f5",
"storage_bucket": "travelmate-a47f5.firebasestorage.app"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:521527250907:android:be3db7fc84f053ec7da1fe",
"android_client_info": {
"package_name": "com.example.travel_mate"
}
},
"oauth_client": [
{
"client_id": "521527250907-lqgj1lmfcsjusm2be9r6kpuanq3jvjcd.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.example.travel_mate",
"certificate_hash": "9b7e3f14f0fcae0034ed977b5d40305b1812308d"
}
},
{
"client_id": "521527250907-j0kt1hc8hc7qc2kedp4akehau754cn5d.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyAON_ol0Jr34tKbETvdDK9JCQdKNawxBeQ"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "521527250907-j0kt1hc8hc7qc2kedp4akehau754cn5d.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "521527250907-3i1qe2656eojs8k9hjdi573j09i9p41m.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.example.travelMate"
}
}
]
}
}
}
],
"configuration_version": "1"
}

View File

@@ -20,6 +20,9 @@ pluginManagement {
plugins {
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "8.9.1" apply false
// START: FlutterFire Configuration
id("com.google.gms.google-services") version("4.3.15") apply false
// END: FlutterFire Configuration
id("org.jetbrains.kotlin.android") version "2.1.0" apply false
}