From eceda684f0a29406c86e24d330410044522b7b12 Mon Sep 17 00:00:00 2001 From: Hugo Pointcheval Date: Fri, 11 Nov 2022 19:08:28 -0500 Subject: [PATCH] fix(auth): fix some bugs to validate publishing --- packages/wyatt_authentication_bloc/.pubignore | 1 + .../example/android/app/google-services.json | 91 ------------------- .../example_router/.gitignore | 2 + .../example_router/lib/bootstrap.dart | 9 +- .../example_router/lib/firebase_options.dart | 66 -------------- .../wyatt_authentication_bloc/pubspec.yaml | 6 +- 6 files changed, 7 insertions(+), 168 deletions(-) create mode 100644 packages/wyatt_authentication_bloc/.pubignore delete mode 100644 packages/wyatt_authentication_bloc/example/android/app/google-services.json delete mode 100644 packages/wyatt_authentication_bloc/example_router/lib/firebase_options.dart diff --git a/packages/wyatt_authentication_bloc/.pubignore b/packages/wyatt_authentication_bloc/.pubignore new file mode 100644 index 00000000..942f102d --- /dev/null +++ b/packages/wyatt_authentication_bloc/.pubignore @@ -0,0 +1 @@ +firebase_options.dart \ No newline at end of file diff --git a/packages/wyatt_authentication_bloc/example/android/app/google-services.json b/packages/wyatt_authentication_bloc/example/android/app/google-services.json deleted file mode 100644 index 448a816f..00000000 --- a/packages/wyatt_authentication_bloc/example/android/app/google-services.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "project_info": { - "project_number": "136771801992", - "firebase_url": "https://tchat-beta.firebaseio.com", - "project_id": "tchat-beta", - "storage_bucket": "tchat-beta.appspot.com" - }, - "client": [ - { - "client_info": { - "mobilesdk_app_id": "1:136771801992:android:4ff419f07afdad6097203d", - "android_client_info": { - "package_name": "com.example.authentication_bloc_example" - } - }, - "oauth_client": [ - { - "client_id": "136771801992-nps7ic22shstvgdv0c2ojvbkj3dkntum.apps.googleusercontent.com", - "client_type": 1, - "android_info": { - "package_name": "com.example.authentication_bloc_example", - "certificate_hash": "5d8790309e13b68c35e5d4d8437c35c6d15e6131" - } - }, - { - "client_id": "136771801992-ncuib3rbu7p4ro4eo5su4vaudn2u4qrv.apps.googleusercontent.com", - "client_type": 3 - } - ], - "api_key": [ - { - "current_key": "AIzaSyAYS14uXupkS158Q5QAFP1864UrUN_yDSk" - } - ], - "services": { - "appinvite_service": { - "other_platform_oauth_client": [ - { - "client_id": "136771801992-ncuib3rbu7p4ro4eo5su4vaudn2u4qrv.apps.googleusercontent.com", - "client_type": 3 - }, - { - "client_id": "136771801992-e585bm1n9b3lv89t4phrl9u0glsg52ua.apps.googleusercontent.com", - "client_type": 2, - "ios_info": { - "bundle_id": "com.example.example" - } - } - ] - } - } - }, - { - "client_info": { - "mobilesdk_app_id": "1:136771801992:android:8482c9b90bc29de697203d", - "android_client_info": { - "package_name": "com.example.crud_bloc_example" - } - }, - "oauth_client": [ - { - "client_id": "136771801992-ncuib3rbu7p4ro4eo5su4vaudn2u4qrv.apps.googleusercontent.com", - "client_type": 3 - } - ], - "api_key": [ - { - "current_key": "AIzaSyAYS14uXupkS158Q5QAFP1864UrUN_yDSk" - } - ], - "services": { - "appinvite_service": { - "other_platform_oauth_client": [ - { - "client_id": "136771801992-ncuib3rbu7p4ro4eo5su4vaudn2u4qrv.apps.googleusercontent.com", - "client_type": 3 - }, - { - "client_id": "136771801992-e585bm1n9b3lv89t4phrl9u0glsg52ua.apps.googleusercontent.com", - "client_type": 2, - "ios_info": { - "bundle_id": "com.example.example" - } - } - ] - } - } - } - ], - "configuration_version": "1" -} \ No newline at end of file diff --git a/packages/wyatt_authentication_bloc/example_router/.gitignore b/packages/wyatt_authentication_bloc/example_router/.gitignore index a8e938c0..f0edd542 100644 --- a/packages/wyatt_authentication_bloc/example_router/.gitignore +++ b/packages/wyatt_authentication_bloc/example_router/.gitignore @@ -45,3 +45,5 @@ app.*.map.json /android/app/debug /android/app/profile /android/app/release + +firebase_options.dart \ No newline at end of file diff --git a/packages/wyatt_authentication_bloc/example_router/lib/bootstrap.dart b/packages/wyatt_authentication_bloc/example_router/lib/bootstrap.dart index f5fd03eb..84bb68c4 100644 --- a/packages/wyatt_authentication_bloc/example_router/lib/bootstrap.dart +++ b/packages/wyatt_authentication_bloc/example_router/lib/bootstrap.dart @@ -3,7 +3,7 @@ // ----- // File: bootstrap.dart // Created Date: 19/08/2022 15:05:17 -// Last Modified: Wed Nov 09 2022 +// Last Modified: Fri Nov 11 2022 // ----- // Copyright (c) 2022 @@ -11,8 +11,6 @@ import 'dart:async'; import 'package:example_router/core/dependency_injection/get_it.dart'; import 'package:example_router/core/utils/app_bloc_observer.dart'; -import 'package:example_router/firebase_options.dart'; -import 'package:firebase_core/firebase_core.dart'; import 'package:flutter/widgets.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; @@ -25,11 +23,6 @@ Future bootstrap(FutureOr Function() builder) async { FlutterError.onError = (details) { debugPrint(details.toString()); }; - - await Firebase.initializeApp( - options: DefaultFirebaseOptions.currentPlatform, - ); - await GetItInitializer.init(); runApp(await builder()); diff --git a/packages/wyatt_authentication_bloc/example_router/lib/firebase_options.dart b/packages/wyatt_authentication_bloc/example_router/lib/firebase_options.dart deleted file mode 100644 index f0198262..00000000 --- a/packages/wyatt_authentication_bloc/example_router/lib/firebase_options.dart +++ /dev/null @@ -1,66 +0,0 @@ -// File generated by FlutterFire CLI. -// ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members -import 'package:firebase_core/firebase_core.dart' show FirebaseOptions; -import 'package:flutter/foundation.dart' - show defaultTargetPlatform, kIsWeb, TargetPlatform; - -/// Default [FirebaseOptions] for use with your Firebase apps. -/// -/// Example: -/// ```dart -/// import 'firebase_options.dart'; -/// // ... -/// await Firebase.initializeApp( -/// options: DefaultFirebaseOptions.currentPlatform, -/// ); -/// ``` -class DefaultFirebaseOptions { - static FirebaseOptions get currentPlatform { - if (kIsWeb) { - throw UnsupportedError( - 'DefaultFirebaseOptions have not been configured for web - ' - 'you can reconfigure this by running the FlutterFire CLI again.', - ); - } - switch (defaultTargetPlatform) { - case TargetPlatform.android: - throw UnsupportedError( - 'DefaultFirebaseOptions have not been configured for android - ' - 'you can reconfigure this by running the FlutterFire CLI again.', - ); - case TargetPlatform.iOS: - return ios; - case TargetPlatform.macOS: - throw UnsupportedError( - 'DefaultFirebaseOptions have not been configured for macos - ' - 'you can reconfigure this by running the FlutterFire CLI again.', - ); - case TargetPlatform.windows: - throw UnsupportedError( - 'DefaultFirebaseOptions have not been configured for windows - ' - 'you can reconfigure this by running the FlutterFire CLI again.', - ); - case TargetPlatform.linux: - throw UnsupportedError( - 'DefaultFirebaseOptions have not been configured for linux - ' - 'you can reconfigure this by running the FlutterFire CLI again.', - ); - default: - throw UnsupportedError( - 'DefaultFirebaseOptions are not supported for this platform.', - ); - } - } - - static const FirebaseOptions ios = FirebaseOptions( - apiKey: 'AIzaSyCDbbhjbFrQwLXuIANdJzjkDk8uOETnn7w', - appId: '1:136771801992:ios:bcdca68d2b7d227097203d', - messagingSenderId: '136771801992', - projectId: 'tchat-beta', - databaseURL: 'https://tchat-beta.firebaseio.com', - storageBucket: 'tchat-beta.appspot.com', - androidClientId: '136771801992-n2pq8oqutvrqj58e05hbavvc7n1jdfjb.apps.googleusercontent.com', - iosClientId: '136771801992-p629tpo9bk3hcm2955s5ahivdla57ln9.apps.googleusercontent.com', - iosBundleId: 'com.example.exampleRouter', - ); -} diff --git a/packages/wyatt_authentication_bloc/pubspec.yaml b/packages/wyatt_authentication_bloc/pubspec.yaml index 1083fb93..f25dd8d6 100644 --- a/packages/wyatt_authentication_bloc/pubspec.yaml +++ b/packages/wyatt_authentication_bloc/pubspec.yaml @@ -24,15 +24,15 @@ dependencies: wyatt_form_bloc: hosted: https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub/ - version: 0.1.0+1 + version: ^0.1.0+1 wyatt_architecture: hosted: https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub/ - version: 0.0.2 + version: ^0.0.2 wyatt_type_utils: hosted: https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub/ - version: 0.0.3+1 + version: ^0.0.3+1 dev_dependencies: flutter_test: