From bcbcdca6418749f2ecc2aa82cacf3e1466393caa Mon Sep 17 00:00:00 2001 From: Collin Jackson Date: Mon, 29 Jul 2019 09:19:09 -0700 Subject: [PATCH 01/10] Fix for iOS auth crash --- packages/firebase_auth/CHANGELOG.md | 6 ++++ .../example/test/firebase_auth.dart | 35 +++++++++++++++++++ .../ios/Classes/FirebaseAuthPlugin.m | 2 +- .../firebase_auth/lib/src/firebase_user.dart | 8 ++++- 4 files changed, 49 insertions(+), 2 deletions(-) diff --git a/packages/firebase_auth/CHANGELOG.md b/packages/firebase_auth/CHANGELOG.md index 0d55deeffbd2..7f7b4047dd0a 100644 --- a/packages/firebase_auth/CHANGELOG.md +++ b/packages/firebase_auth/CHANGELOG.md @@ -1,3 +1,9 @@ +## 0.13.1 + +* Fixed a crash on iOS when sign-in fails. +* Additional integration testing. +* Updated documentation for `FirebaseUser.delete()` to include error codes. + ## 0.13.0 * **Breaking change**: Replace `FirebaseUserMetadata.creationTimestamp` and diff --git a/packages/firebase_auth/example/test/firebase_auth.dart b/packages/firebase_auth/example/test/firebase_auth.dart index 6acf6e6d9b62..1b54f955d56b 100644 --- a/packages/firebase_auth/example/test/firebase_auth.dart +++ b/packages/firebase_auth/example/test/firebase_auth.dart @@ -3,11 +3,15 @@ // BSD-style license that can be found in the LICENSE file. import 'dart:async'; +import 'dart:math'; import 'package:firebase_auth/firebase_auth.dart'; import 'package:flutter_driver/driver_extension.dart'; import 'package:flutter_test/flutter_test.dart'; +const String kTestEmail = 'test@example.com'; +const String kTestPassword = 'password'; + void main() { final Completer completer = Completer(); enableFlutterDriverExtension(handler: (_) => completer.future); @@ -46,6 +50,37 @@ void main() { user2.metadata.lastSignInTime, equals(user2.metadata.creationTime)); }); + test('email auth', () async { + final Random random = Random(); + final String testEmail = 'testuser${random.nextInt(100000000)}@gmail.com'; + final String testPassword = 'testpassword'; + AuthResult result = await auth.createUserWithEmailAndPassword( + email: testEmail, + password: testPassword, + ); + final FirebaseUser user = result.user; + expect(user.uid, isNotNull); + expect(user.isAnonymous, isFalse); + auth.signOut(); + result = nil; + try { + result = await auth.signInWithEmailAndPassword( + email: testEmail, + password: 'incorrect password', + ); + } catch(e) { + // login failed + } + expect(result, isNil); + result = await auth.signInWithEmailAndPassword( + email: testEmail, + password: testPassword, + ); + expect(result.user.uid, equals(user.uid)); + auth.signOut(); + await user.delete(); + }); + test('isSignInWithEmailLink', () async { final String emailLink1 = 'https://www.example.com/action?mode=signIn&' 'oobCode=oobCode&apiKey=API_KEY'; diff --git a/packages/firebase_auth/ios/Classes/FirebaseAuthPlugin.m b/packages/firebase_auth/ios/Classes/FirebaseAuthPlugin.m index d6e469393314..dccbd28ee8fa 100644 --- a/packages/firebase_auth/ios/Classes/FirebaseAuthPlugin.m +++ b/packages/firebase_auth/ios/Classes/FirebaseAuthPlugin.m @@ -373,7 +373,7 @@ - (void)sendResult:(FlutterResult)result FIRAdditionalUserInfo *additionalUserInfo = authResult.additionalUserInfo; [self sendResult:result forObject:@{ - @"user" : (user != nil ? [self dictionaryFromUser:user] : nil), + @"user" : (user != nil ? [self dictionaryFromUser:user] : [NSNull null]), @"additionalUserInfo" : additionalUserInfo ? @{ @"isNewUser" : [NSNumber numberWithBool:additionalUserInfo.isNewUser], @"username" : additionalUserInfo.username ?: [NSNull null], diff --git a/packages/firebase_auth/lib/src/firebase_user.dart b/packages/firebase_auth/lib/src/firebase_user.dart index e9093ce2f1ad..c30a5aaf0c65 100644 --- a/packages/firebase_auth/lib/src/firebase_user.dart +++ b/packages/firebase_auth/lib/src/firebase_user.dart @@ -86,7 +86,13 @@ class FirebaseUser extends UserInfo { .invokeMethod('reload', {'app': _app.name}); } - /// Deletes the user record from your Firebase project's database. + /// Deletes the current user (also signs out the user). + /// + /// Errors: + /// • `ERROR_REQUIRES_RECENT_LOGIN` - If the user's last sign-in time does not meet the security threshold. Use reauthenticate methods to resolve. + /// • `ERROR_INVALID_CREDENTIAL` - If the credential is malformed or has expired. + /// • `ERROR_USER_DISABLED` - If the user has been disabled (for example, in the Firebase console) + /// • `ERROR_USER_NOT_FOUND` - If the user has been deleted (for example, in the Firebase console) Future delete() async { await FirebaseAuth.channel .invokeMethod('delete', {'app': _app.name}); From 5ab6df3bba79052f80ba1412355498508a4eab4e Mon Sep 17 00:00:00 2001 From: Collin Jackson Date: Mon, 29 Jul 2019 10:33:33 -0700 Subject: [PATCH 02/10] Fix test --- .../example/test/firebase_auth.dart | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/packages/firebase_auth/example/test/firebase_auth.dart b/packages/firebase_auth/example/test/firebase_auth.dart index 1b54f955d56b..c62257a8de2f 100644 --- a/packages/firebase_auth/example/test/firebase_auth.dart +++ b/packages/firebase_auth/example/test/firebase_auth.dart @@ -6,6 +6,7 @@ import 'dart:async'; import 'dart:math'; import 'package:firebase_auth/firebase_auth.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_driver/driver_extension.dart'; import 'package:flutter_test/flutter_test.dart'; @@ -62,16 +63,11 @@ void main() { expect(user.uid, isNotNull); expect(user.isAnonymous, isFalse); auth.signOut(); - result = nil; - try { - result = await auth.signInWithEmailAndPassword( - email: testEmail, - password: 'incorrect password', - ); - } catch(e) { - // login failed - } - expect(result, isNil); + Future failedResult = auth.signInWithEmailAndPassword( + email: testEmail, + password: 'incorrect password', + ); + expect(failedResult, throwsA(isInstanceOf())); result = await auth.signInWithEmailAndPassword( email: testEmail, password: testPassword, From bbca6b9b4d8ee2044dec7923d12691bb7a3b954b Mon Sep 17 00:00:00 2001 From: Collin Jackson Date: Mon, 29 Jul 2019 10:33:53 -0700 Subject: [PATCH 03/10] Update to new Firebase project --- .../example/android/app/google-services.json | 228 ++++++++++++++++-- .../ios/Runner/GoogleService-Info.plist | 26 +- 2 files changed, 224 insertions(+), 30 deletions(-) mode change 100755 => 100644 packages/firebase_auth/example/android/app/google-services.json diff --git a/packages/firebase_auth/example/android/app/google-services.json b/packages/firebase_auth/example/android/app/google-services.json old mode 100755 new mode 100644 index eccaa4d9da46..07c52d150c16 --- a/packages/firebase_auth/example/android/app/google-services.json +++ b/packages/firebase_auth/example/android/app/google-services.json @@ -1,52 +1,248 @@ { "project_info": { - "project_number": "466218294969", - "firebase_url": "https://flutter-plugins-auth.firebaseio.com", - "project_id": "flutter-plugins-auth", - "storage_bucket": "flutter-plugins-auth.appspot.com" + "project_number": "159623150305", + "firebase_url": "https://flutter-firebase-plugins.firebaseio.com", + "project_id": "flutter-firebase-plugins", + "storage_bucket": "flutter-firebase-plugins.appspot.com" }, "client": [ { "client_info": { - "mobilesdk_app_id": "1:466218294969:android:11e8f037a4a3ec3b", + "mobilesdk_app_id": "1:159623150305:android:236f9daea101f77e", + "android_client_info": { + "package_name": "io.flutter.plugins.firebase.firestoreexample" + } + }, + "oauth_client": [ + { + "client_id": "159623150305-q05bbbtsutr02abhips3suj7hujfk4bg.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyChk3KEG7QYrs4kQPLP1tjJNxBTbfCAdgg" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "159623150305-q05bbbtsutr02abhips3suj7hujfk4bg.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "159623150305-h67j0o93bcctblfhde74r7fssmcobamr.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "io.flutter.plugins.firebaseAuthExample" + } + } + ] + } + } + }, + { + "client_info": { + "mobilesdk_app_id": "1:159623150305:android:11e8f037a4a3ec3b", "android_client_info": { "package_name": "io.flutter.plugins.firebaseauthexample" } }, "oauth_client": [ { - "client_id": "466218294969-ikp8nslafq77v10dkp83f1atvfkacide.apps.googleusercontent.com", + "client_id": "159623150305-q05bbbtsutr02abhips3suj7hujfk4bg.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyChk3KEG7QYrs4kQPLP1tjJNxBTbfCAdgg" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "159623150305-q05bbbtsutr02abhips3suj7hujfk4bg.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "159623150305-h67j0o93bcctblfhde74r7fssmcobamr.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "io.flutter.plugins.firebaseAuthExample" + } + } + ] + } + } + }, + { + "client_info": { + "mobilesdk_app_id": "1:159623150305:android:c68d3ad04a4046db", + "android_client_info": { + "package_name": "io.flutter.plugins.firebasedatabaseexample" + } + }, + "oauth_client": [ + { + "client_id": "159623150305-j5cqghi5snpqptesd2mdjum7o35hiltb.apps.googleusercontent.com", "client_type": 1, "android_info": { - "package_name": "io.flutter.plugins.firebaseauthexample", - "certificate_hash": "f8323ac5fe6e7adc1ddc5612e16b5d04d7f1358b" + "package_name": "io.flutter.plugins.firebasedatabaseexample", + "certificate_hash": "9ee6a0388f780cf93a852248905d2d3d83d8e50d" } }, { - "client_id": "466218294969-t7bmju7plgllvluqpgb1gklfuv56pfr8.apps.googleusercontent.com", + "client_id": "159623150305-q05bbbtsutr02abhips3suj7hujfk4bg.apps.googleusercontent.com", "client_type": 3 } ], "api_key": [ { - "current_key": "AIzaSyA4il7ZGUO9gi7ErxFspGcaxi0qr9Huifc" + "current_key": "AIzaSyChk3KEG7QYrs4kQPLP1tjJNxBTbfCAdgg" } ], "services": { - "analytics_service": { - "status": 1 + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "159623150305-q05bbbtsutr02abhips3suj7hujfk4bg.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "159623150305-h67j0o93bcctblfhde74r7fssmcobamr.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "io.flutter.plugins.firebaseAuthExample" + } + } + ] + } + } + }, + { + "client_info": { + "mobilesdk_app_id": "1:159623150305:android:620f0e4ca16cbddd", + "android_client_info": { + "package_name": "io.flutter.plugins.firebasemessagingexample" + } + }, + "oauth_client": [ + { + "client_id": "159623150305-qubsrfqbnrp4vurajv72eujgk164nin0.apps.googleusercontent.com", + "client_type": 1, + "android_info": { + "package_name": "io.flutter.plugins.firebasemessagingexample", + "certificate_hash": "f8323ac5fe6e7adc1ddc5612e16b5d04d7f1358b" + } }, + { + "client_id": "159623150305-q05bbbtsutr02abhips3suj7hujfk4bg.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyChk3KEG7QYrs4kQPLP1tjJNxBTbfCAdgg" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "159623150305-q05bbbtsutr02abhips3suj7hujfk4bg.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "159623150305-h67j0o93bcctblfhde74r7fssmcobamr.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "io.flutter.plugins.firebaseAuthExample" + } + } + ] + } + } + }, + { + "client_info": { + "mobilesdk_app_id": "1:159623150305:android:ef48439a0cc0263d", + "android_client_info": { + "package_name": "io.flutter.plugins.firebasestorageexample" + } + }, + "oauth_client": [ + { + "client_id": "159623150305-q05bbbtsutr02abhips3suj7hujfk4bg.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyChk3KEG7QYrs4kQPLP1tjJNxBTbfCAdgg" + } + ], + "services": { "appinvite_service": { - "status": 2, "other_platform_oauth_client": [ { - "client_id": "466218294969-t7bmju7plgllvluqpgb1gklfuv56pfr8.apps.googleusercontent.com", + "client_id": "159623150305-q05bbbtsutr02abhips3suj7hujfk4bg.apps.googleusercontent.com", "client_type": 3 + }, + { + "client_id": "159623150305-h67j0o93bcctblfhde74r7fssmcobamr.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "io.flutter.plugins.firebaseAuthExample" + } } ] + } + } + }, + { + "client_info": { + "mobilesdk_app_id": "1:159623150305:android:5e9f1f89e134dc86", + "android_client_info": { + "package_name": "io.flutter.plugins.googlesigninexample" + } + }, + "oauth_client": [ + { + "client_id": "159623150305-3suu3qq4vs3ki7uaigbtrh2aal1p9ram.apps.googleusercontent.com", + "client_type": 1, + "android_info": { + "package_name": "io.flutter.plugins.googlesigninexample", + "certificate_hash": "f8323ac5fe6e7adc1ddc5612e16b5d04d7f1358b" + } }, - "ads_service": { - "status": 2 + { + "client_id": "159623150305-q05bbbtsutr02abhips3suj7hujfk4bg.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyChk3KEG7QYrs4kQPLP1tjJNxBTbfCAdgg" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "159623150305-q05bbbtsutr02abhips3suj7hujfk4bg.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "159623150305-h67j0o93bcctblfhde74r7fssmcobamr.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "io.flutter.plugins.firebaseAuthExample" + } + } + ] } } } diff --git a/packages/firebase_auth/example/ios/Runner/GoogleService-Info.plist b/packages/firebase_auth/example/ios/Runner/GoogleService-Info.plist index 991d668efeea..2f48146fd821 100644 --- a/packages/firebase_auth/example/ios/Runner/GoogleService-Info.plist +++ b/packages/firebase_auth/example/ios/Runner/GoogleService-Info.plist @@ -2,39 +2,37 @@ - AD_UNIT_ID_FOR_BANNER_TEST - ca-app-pub-3940256099942544/2934735716 - AD_UNIT_ID_FOR_INTERSTITIAL_TEST - ca-app-pub-3940256099942544/4411468910 CLIENT_ID - 466218294969-5mdmh6opkqd87a5m81nm83u4eqd3bvgk.apps.googleusercontent.com + 159623150305-h67j0o93bcctblfhde74r7fssmcobamr.apps.googleusercontent.com REVERSED_CLIENT_ID - com.googleusercontent.apps.466218294969-5mdmh6opkqd87a5m81nm83u4eqd3bvgk + com.googleusercontent.apps.159623150305-h67j0o93bcctblfhde74r7fssmcobamr + ANDROID_CLIENT_ID + 159623150305-j5cqghi5snpqptesd2mdjum7o35hiltb.apps.googleusercontent.com API_KEY - AIzaSyCb0BM8Q9o_gCubuHvsxdxHSgDZaQoZrv0 + AIzaSyDyzecVw1zXTpBKwfFHxpl7QyYBhimNhUk GCM_SENDER_ID - 466218294969 + 159623150305 PLIST_VERSION 1 BUNDLE_ID io.flutter.plugins.firebaseAuthExample PROJECT_ID - flutter-plugins-auth + flutter-firebase-plugins STORAGE_BUCKET - flutter-plugins-auth.appspot.com + flutter-firebase-plugins.appspot.com IS_ADS_ENABLED - + IS_ANALYTICS_ENABLED IS_APPINVITE_ENABLED - + IS_GCM_ENABLED IS_SIGNIN_ENABLED GOOGLE_APP_ID - 1:466218294969:ios:8d89e1b69d780386 + 1:159623150305:ios:8d89e1b69d780386 DATABASE_URL - https://flutter-plugins-auth.firebaseio.com + https://flutter-firebase-plugins.firebaseio.com \ No newline at end of file From 5d1ae4560d74786128cbc56501f17d50cbd495b9 Mon Sep 17 00:00:00 2001 From: Collin Jackson Date: Mon, 29 Jul 2019 10:36:54 -0700 Subject: [PATCH 04/10] Avoid signing out before deleting user --- packages/firebase_auth/example/test/firebase_auth.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/firebase_auth/example/test/firebase_auth.dart b/packages/firebase_auth/example/test/firebase_auth.dart index c62257a8de2f..dc39050313d1 100644 --- a/packages/firebase_auth/example/test/firebase_auth.dart +++ b/packages/firebase_auth/example/test/firebase_auth.dart @@ -73,7 +73,6 @@ void main() { password: testPassword, ); expect(result.user.uid, equals(user.uid)); - auth.signOut(); await user.delete(); }); From 738fbbc9778e748ff9b2ab64f3ab797da41d12d9 Mon Sep 17 00:00:00 2001 From: Collin Jackson Date: Mon, 29 Jul 2019 10:42:52 -0700 Subject: [PATCH 05/10] Use uuid --- packages/firebase_auth/example/pubspec.yaml | 1 + packages/firebase_auth/example/test/firebase_auth.dart | 6 ++---- packages/firebase_auth/pubspec.yaml | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/firebase_auth/example/pubspec.yaml b/packages/firebase_auth/example/pubspec.yaml index a72835476bcb..9478c9b1f34f 100755 --- a/packages/firebase_auth/example/pubspec.yaml +++ b/packages/firebase_auth/example/pubspec.yaml @@ -10,6 +10,7 @@ dependencies: google_sign_in: ^4.0.0 firebase_core: ^0.4.0+8 firebase_dynamic_links: ^0.3.0 + uuid: ^2.0.2 dev_dependencies: flutter_driver: diff --git a/packages/firebase_auth/example/test/firebase_auth.dart b/packages/firebase_auth/example/test/firebase_auth.dart index dc39050313d1..6409ed52403a 100644 --- a/packages/firebase_auth/example/test/firebase_auth.dart +++ b/packages/firebase_auth/example/test/firebase_auth.dart @@ -7,12 +7,10 @@ import 'dart:math'; import 'package:firebase_auth/firebase_auth.dart'; import 'package:flutter/services.dart'; +import 'package:uuid/uuid.dart'; import 'package:flutter_driver/driver_extension.dart'; import 'package:flutter_test/flutter_test.dart'; -const String kTestEmail = 'test@example.com'; -const String kTestPassword = 'password'; - void main() { final Completer completer = Completer(); enableFlutterDriverExtension(handler: (_) => completer.future); @@ -53,7 +51,7 @@ void main() { test('email auth', () async { final Random random = Random(); - final String testEmail = 'testuser${random.nextInt(100000000)}@gmail.com'; + final String testEmail = 'testuser${Uuid().v4()}@example.com'; final String testPassword = 'testpassword'; AuthResult result = await auth.createUserWithEmailAndPassword( email: testEmail, diff --git a/packages/firebase_auth/pubspec.yaml b/packages/firebase_auth/pubspec.yaml index deabd4712be2..e30daa98a059 100755 --- a/packages/firebase_auth/pubspec.yaml +++ b/packages/firebase_auth/pubspec.yaml @@ -22,6 +22,7 @@ dependencies: dev_dependencies: google_sign_in: ^3.0.4 firebase_dynamic_links: ^0.3.0 + uuid: ^2.0.2 test: ^1.3.0 flutter_test: sdk: flutter From 35dbbe4507631fadeecea68b0c8bae181e4646a5 Mon Sep 17 00:00:00 2001 From: Collin Jackson Date: Mon, 29 Jul 2019 10:48:07 -0700 Subject: [PATCH 06/10] Fix analyzer --- packages/firebase_auth/example/test/firebase_auth.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/firebase_auth/example/test/firebase_auth.dart b/packages/firebase_auth/example/test/firebase_auth.dart index 6409ed52403a..f2f4b7a1355d 100644 --- a/packages/firebase_auth/example/test/firebase_auth.dart +++ b/packages/firebase_auth/example/test/firebase_auth.dart @@ -50,7 +50,6 @@ void main() { }); test('email auth', () async { - final Random random = Random(); final String testEmail = 'testuser${Uuid().v4()}@example.com'; final String testPassword = 'testpassword'; AuthResult result = await auth.createUserWithEmailAndPassword( @@ -61,7 +60,7 @@ void main() { expect(user.uid, isNotNull); expect(user.isAnonymous, isFalse); auth.signOut(); - Future failedResult = auth.signInWithEmailAndPassword( + final Future failedResult = auth.signInWithEmailAndPassword( email: testEmail, password: 'incorrect password', ); From 7b552757ec3604700081cd686f16697516ad921b Mon Sep 17 00:00:00 2001 From: Collin Jackson Date: Mon, 29 Jul 2019 10:51:03 -0700 Subject: [PATCH 07/10] Bump version --- packages/firebase_auth/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/firebase_auth/pubspec.yaml b/packages/firebase_auth/pubspec.yaml index e30daa98a059..dd83322c0150 100755 --- a/packages/firebase_auth/pubspec.yaml +++ b/packages/firebase_auth/pubspec.yaml @@ -4,7 +4,7 @@ description: Flutter plugin for Firebase Auth, enabling Android and iOS like Google, Facebook and Twitter. author: Flutter Team homepage: https://github.com/flutter/plugins/tree/master/packages/firebase_auth -version: 0.13.0 +version: 0.13.1 flutter: plugin: From 7cfddd5ff165aced7d40be0a56d35edf763781fe Mon Sep 17 00:00:00 2001 From: Collin Jackson Date: Mon, 29 Jul 2019 11:06:02 -0700 Subject: [PATCH 08/10] Update CHANGELOG --- packages/firebase_auth/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/firebase_auth/CHANGELOG.md b/packages/firebase_auth/CHANGELOG.md index 7f7b4047dd0a..cd866ad7547a 100644 --- a/packages/firebase_auth/CHANGELOG.md +++ b/packages/firebase_auth/CHANGELOG.md @@ -3,6 +3,7 @@ * Fixed a crash on iOS when sign-in fails. * Additional integration testing. * Updated documentation for `FirebaseUser.delete()` to include error codes. +* Updated Firebase project to match other Flutterfire apps. ## 0.13.0 From 655664abe3400aecd5e112a281cda940ba48746a Mon Sep 17 00:00:00 2001 From: Collin Jackson Date: Mon, 29 Jul 2019 11:19:53 -0700 Subject: [PATCH 09/10] remove unused import --- packages/firebase_auth/example/test/firebase_auth.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/firebase_auth/example/test/firebase_auth.dart b/packages/firebase_auth/example/test/firebase_auth.dart index f2f4b7a1355d..e06b387f6802 100644 --- a/packages/firebase_auth/example/test/firebase_auth.dart +++ b/packages/firebase_auth/example/test/firebase_auth.dart @@ -3,7 +3,6 @@ // BSD-style license that can be found in the LICENSE file. import 'dart:async'; -import 'dart:math'; import 'package:firebase_auth/firebase_auth.dart'; import 'package:flutter/services.dart'; From 6c2260850b4a7fe80f480b2c5dffdee6745759c8 Mon Sep 17 00:00:00 2001 From: Collin Jackson Date: Mon, 29 Jul 2019 11:29:46 -0700 Subject: [PATCH 10/10] Update application identifier to avoid conflict --- .../example/android/app/build.gradle | 2 +- .../example/android/app/google-services.json | 52 +++++++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/packages/firebase_auth/example/android/app/build.gradle b/packages/firebase_auth/example/android/app/build.gradle index d31dce7a99f4..295870863a51 100755 --- a/packages/firebase_auth/example/android/app/build.gradle +++ b/packages/firebase_auth/example/android/app/build.gradle @@ -32,7 +32,7 @@ android { } defaultConfig { - applicationId "io.flutter.plugins.firebaseauthexample" + applicationId "dev.flutter.plugins.firebaseauthexample" minSdkVersion 16 targetSdkVersion 28 versionCode flutterVersionCode.toInteger() diff --git a/packages/firebase_auth/example/android/app/google-services.json b/packages/firebase_auth/example/android/app/google-services.json index 07c52d150c16..238110fbb63e 100644 --- a/packages/firebase_auth/example/android/app/google-services.json +++ b/packages/firebase_auth/example/android/app/google-services.json @@ -6,6 +6,42 @@ "storage_bucket": "flutter-firebase-plugins.appspot.com" }, "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:159623150305:android:2e167f427b396288", + "android_client_info": { + "package_name": "dev.flutter.plugins.firebaseauthexample" + } + }, + "oauth_client": [ + { + "client_id": "159623150305-q05bbbtsutr02abhips3suj7hujfk4bg.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyChk3KEG7QYrs4kQPLP1tjJNxBTbfCAdgg" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "159623150305-q05bbbtsutr02abhips3suj7hujfk4bg.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "159623150305-h67j0o93bcctblfhde74r7fssmcobamr.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "io.flutter.plugins.firebaseAuthExample" + } + } + ] + } + } + }, { "client_info": { "mobilesdk_app_id": "1:159623150305:android:236f9daea101f77e", @@ -50,6 +86,22 @@ } }, "oauth_client": [ + { + "client_id": "159623150305-6cf91dro1kro30hdlfp3rkod8mldc81c.apps.googleusercontent.com", + "client_type": 1, + "android_info": { + "package_name": "io.flutter.plugins.firebaseauthexample", + "certificate_hash": "4ef1514a34a8edf0f5b3ff7108d3497fa3449f69" + } + }, + { + "client_id": "159623150305-pjkkv9ff9tgkmjs7kjalsqv2pp6ltj04.apps.googleusercontent.com", + "client_type": 1, + "android_info": { + "package_name": "io.flutter.plugins.firebaseauthexample", + "certificate_hash": "9ee6a0388f780cf93a852248905d2d3d83d8e50d" + } + }, { "client_id": "159623150305-q05bbbtsutr02abhips3suj7hujfk4bg.apps.googleusercontent.com", "client_type": 3