diff --git a/packages/firebase_core/firebase_core/android/src/main/java/io/flutter/plugins/firebase/core/FlutterFirebaseCorePlugin.java b/packages/firebase_core/firebase_core/android/src/main/java/io/flutter/plugins/firebase/core/FlutterFirebaseCorePlugin.java index a1fed94439e3..fcdeb2a7f5ac 100644 --- a/packages/firebase_core/firebase_core/android/src/main/java/io/flutter/plugins/firebase/core/FlutterFirebaseCorePlugin.java +++ b/packages/firebase_core/firebase_core/android/src/main/java/io/flutter/plugins/firebase/core/FlutterFirebaseCorePlugin.java @@ -63,6 +63,7 @@ private GeneratedAndroidFirebaseCore.CoreFirebaseOptions firebaseOptionsToMap( firebaseOptions.setDatabaseURL(options.getDatabaseUrl()); firebaseOptions.setStorageBucket(options.getStorageBucket()); firebaseOptions.setTrackingId(options.getGaTrackingId()); + // TODO(recaptchaSiteKey): Map recaptchaSiteKey if stored. return firebaseOptions.build(); } @@ -165,6 +166,8 @@ public void initializeApp( customAuthDomain.put(appName, initializeAppRequest.getAuthDomain()); } + // TODO(recaptchaSiteKey): Store or use recaptchaSiteKey if needed. + FirebaseApp firebaseApp = FirebaseApp.initializeApp(applicationContext, options, appName); taskCompletionSource.setResult(Tasks.await(firebaseAppToMap(firebaseApp))); diff --git a/packages/firebase_core/firebase_core/android/src/main/java/io/flutter/plugins/firebase/core/GeneratedAndroidFirebaseCore.java b/packages/firebase_core/firebase_core/android/src/main/java/io/flutter/plugins/firebase/core/GeneratedAndroidFirebaseCore.java index b0a698faf51c..fdae685adbd8 100644 --- a/packages/firebase_core/firebase_core/android/src/main/java/io/flutter/plugins/firebase/core/GeneratedAndroidFirebaseCore.java +++ b/packages/firebase_core/firebase_core/android/src/main/java/io/flutter/plugins/firebase/core/GeneratedAndroidFirebaseCore.java @@ -377,6 +377,16 @@ public void setAppGroupId(@Nullable String setterArg) { this.appGroupId = setterArg; } + private @Nullable String recaptchaSiteKey; + + public @Nullable String getRecaptchaSiteKey() { + return recaptchaSiteKey; + } + + public void setRecaptchaSiteKey(@Nullable String setterArg) { + this.recaptchaSiteKey = setterArg; + } + /** Constructor is non-public to enforce null safety; use Builder. */ CoreFirebaseOptions() {} @@ -402,7 +412,8 @@ && pigeonDeepEquals(deepLinkURLScheme, that.deepLinkURLScheme) && pigeonDeepEquals(androidClientId, that.androidClientId) && pigeonDeepEquals(iosClientId, that.iosClientId) && pigeonDeepEquals(iosBundleId, that.iosBundleId) - && pigeonDeepEquals(appGroupId, that.appGroupId); + && pigeonDeepEquals(appGroupId, that.appGroupId) + && pigeonDeepEquals(recaptchaSiteKey, that.recaptchaSiteKey); } @Override @@ -423,7 +434,8 @@ public int hashCode() { androidClientId, iosClientId, iosBundleId, - appGroupId + appGroupId, + recaptchaSiteKey }; return pigeonDeepHashCode(fields); } @@ -542,6 +554,14 @@ public static final class Builder { return this; } + private @Nullable String recaptchaSiteKey; + + @CanIgnoreReturnValue + public @NonNull Builder setRecaptchaSiteKey(@Nullable String setterArg) { + this.recaptchaSiteKey = setterArg; + return this; + } + public @NonNull CoreFirebaseOptions build() { CoreFirebaseOptions pigeonReturn = new CoreFirebaseOptions(); pigeonReturn.setApiKey(apiKey); @@ -558,13 +578,14 @@ public static final class Builder { pigeonReturn.setIosClientId(iosClientId); pigeonReturn.setIosBundleId(iosBundleId); pigeonReturn.setAppGroupId(appGroupId); + pigeonReturn.setRecaptchaSiteKey(recaptchaSiteKey); return pigeonReturn; } } @NonNull - ArrayList toList() { - ArrayList toListResult = new ArrayList<>(14); + public ArrayList toList() { + ArrayList toListResult = new ArrayList<>(15); toListResult.add(apiKey); toListResult.add(appId); toListResult.add(messagingSenderId); @@ -579,6 +600,7 @@ ArrayList toList() { toListResult.add(iosClientId); toListResult.add(iosBundleId); toListResult.add(appGroupId); + toListResult.add(recaptchaSiteKey); return toListResult; } @@ -612,6 +634,8 @@ ArrayList toList() { pigeonResult.setIosBundleId((String) iosBundleId); Object appGroupId = pigeonVar_list.get(13); pigeonResult.setAppGroupId((String) appGroupId); + Object recaptchaSiteKey = pigeonVar_list.get(14); + pigeonResult.setRecaptchaSiteKey((String) recaptchaSiteKey); return pigeonResult; } } @@ -740,7 +764,7 @@ public static final class Builder { } @NonNull - ArrayList toList() { + public ArrayList toList() { ArrayList toListResult = new ArrayList<>(4); toListResult.add(name); toListResult.add(options); diff --git a/packages/firebase_core/firebase_core/ios/firebase_core/Sources/firebase_core/FLTFirebaseCorePlugin.m b/packages/firebase_core/firebase_core/ios/firebase_core/Sources/firebase_core/FLTFirebaseCorePlugin.m index 23b3f7b9433b..b68d963b08c7 100644 --- a/packages/firebase_core/firebase_core/ios/firebase_core/Sources/firebase_core/FLTFirebaseCorePlugin.m +++ b/packages/firebase_core/firebase_core/ios/firebase_core/Sources/firebase_core/FLTFirebaseCorePlugin.m @@ -93,6 +93,7 @@ - (CoreFirebaseOptions *)optionsFromFIROptions:(FIROptions *)options { pigeonOptions.iosBundleId = (id)options.bundleID ?: [NSNull null]; pigeonOptions.iosClientId = (id)options.clientID ?: [NSNull null]; pigeonOptions.appGroupId = (id)options.appGroupID ?: [NSNull null]; + // TODO(recaptchaSiteKey): Map recaptchaSiteKey if stored. return pigeonOptions; } @@ -178,6 +179,8 @@ - (void)initializeAppAppName:(nonnull NSString *)appName options.appGroupID = initializeAppRequest.appGroupId; } + // TODO(recaptchaSiteKey): Store or use recaptchaSiteKey if needed. + if (initializeAppRequest.authDomain != nil) { customAuthDomains[appNameIos] = initializeAppRequest.authDomain; } diff --git a/packages/firebase_core/firebase_core/ios/firebase_core/Sources/firebase_core/include/firebase_core/messages.g.h b/packages/firebase_core/firebase_core/ios/firebase_core/Sources/firebase_core/include/firebase_core/messages.g.h index 913fdbbd3e43..561383cc4135 100644 --- a/packages/firebase_core/firebase_core/ios/firebase_core/Sources/firebase_core/include/firebase_core/messages.g.h +++ b/packages/firebase_core/firebase_core/ios/firebase_core/Sources/firebase_core/include/firebase_core/messages.g.h @@ -32,7 +32,8 @@ NS_ASSUME_NONNULL_BEGIN androidClientId:(nullable NSString *)androidClientId iosClientId:(nullable NSString *)iosClientId iosBundleId:(nullable NSString *)iosBundleId - appGroupId:(nullable NSString *)appGroupId; + appGroupId:(nullable NSString *)appGroupId + recaptchaSiteKey:(nullable NSString *)recaptchaSiteKey; @property(nonatomic, copy) NSString *apiKey; @property(nonatomic, copy) NSString *appId; @property(nonatomic, copy) NSString *messagingSenderId; @@ -47,6 +48,7 @@ NS_ASSUME_NONNULL_BEGIN @property(nonatomic, copy, nullable) NSString *iosClientId; @property(nonatomic, copy, nullable) NSString *iosBundleId; @property(nonatomic, copy, nullable) NSString *appGroupId; +@property(nonatomic, copy, nullable) NSString *recaptchaSiteKey; @end @interface CoreInitializeResponse : NSObject diff --git a/packages/firebase_core/firebase_core/ios/firebase_core/Sources/firebase_core/messages.g.m b/packages/firebase_core/firebase_core/ios/firebase_core/Sources/firebase_core/messages.g.m index b1a0a1e69e45..449944316866 100644 --- a/packages/firebase_core/firebase_core/ios/firebase_core/Sources/firebase_core/messages.g.m +++ b/packages/firebase_core/firebase_core/ios/firebase_core/Sources/firebase_core/messages.g.m @@ -143,7 +143,8 @@ + (instancetype)makeWithApiKey:(NSString *)apiKey androidClientId:(nullable NSString *)androidClientId iosClientId:(nullable NSString *)iosClientId iosBundleId:(nullable NSString *)iosBundleId - appGroupId:(nullable NSString *)appGroupId { + appGroupId:(nullable NSString *)appGroupId + recaptchaSiteKey:(nullable NSString *)recaptchaSiteKey { CoreFirebaseOptions *pigeonResult = [[CoreFirebaseOptions alloc] init]; pigeonResult.apiKey = apiKey; pigeonResult.appId = appId; @@ -159,6 +160,7 @@ + (instancetype)makeWithApiKey:(NSString *)apiKey pigeonResult.iosClientId = iosClientId; pigeonResult.iosBundleId = iosBundleId; pigeonResult.appGroupId = appGroupId; + pigeonResult.recaptchaSiteKey = recaptchaSiteKey; return pigeonResult; } + (CoreFirebaseOptions *)fromList:(NSArray *)list { @@ -177,6 +179,7 @@ + (CoreFirebaseOptions *)fromList:(NSArray *)list { pigeonResult.iosClientId = GetNullableObjectAtIndex(list, 11); pigeonResult.iosBundleId = GetNullableObjectAtIndex(list, 12); pigeonResult.appGroupId = GetNullableObjectAtIndex(list, 13); + pigeonResult.recaptchaSiteKey = GetNullableObjectAtIndex(list, 14); return pigeonResult; } + (nullable CoreFirebaseOptions *)nullableFromList:(NSArray *)list { @@ -198,6 +201,7 @@ + (nullable CoreFirebaseOptions *)nullableFromList:(NSArray *)list { self.iosClientId ?: [NSNull null], self.iosBundleId ?: [NSNull null], self.appGroupId ?: [NSNull null], + self.recaptchaSiteKey ?: [NSNull null], ]; } - (BOOL)isEqual:(id)object { @@ -221,7 +225,8 @@ - (BOOL)isEqual:(id)object { FLTPigeonDeepEquals(self.androidClientId, other.androidClientId) && FLTPigeonDeepEquals(self.iosClientId, other.iosClientId) && FLTPigeonDeepEquals(self.iosBundleId, other.iosBundleId) && - FLTPigeonDeepEquals(self.appGroupId, other.appGroupId); + FLTPigeonDeepEquals(self.appGroupId, other.appGroupId) && + FLTPigeonDeepEquals(self.recaptchaSiteKey, other.recaptchaSiteKey); } - (NSUInteger)hash { @@ -240,6 +245,7 @@ - (NSUInteger)hash { result = result * 31 + FLTPigeonDeepHash(self.iosClientId); result = result * 31 + FLTPigeonDeepHash(self.iosBundleId); result = result * 31 + FLTPigeonDeepHash(self.appGroupId); + result = result * 31 + FLTPigeonDeepHash(self.recaptchaSiteKey); return result; } @end diff --git a/packages/firebase_core/firebase_core/windows/messages.g.cpp b/packages/firebase_core/firebase_core/windows/messages.g.cpp index 42e8046a21e1..4bfc5dcbf9c4 100644 --- a/packages/firebase_core/firebase_core/windows/messages.g.cpp +++ b/packages/firebase_core/firebase_core/windows/messages.g.cpp @@ -257,7 +257,8 @@ CoreFirebaseOptions::CoreFirebaseOptions( const std::string* storage_bucket, const std::string* measurement_id, const std::string* tracking_id, const std::string* deep_link_u_r_l_scheme, const std::string* android_client_id, const std::string* ios_client_id, - const std::string* ios_bundle_id, const std::string* app_group_id) + const std::string* ios_bundle_id, const std::string* app_group_id, + const std::string* recaptcha_site_key) : api_key_(api_key), app_id_(app_id), messaging_sender_id_(messaging_sender_id), @@ -287,7 +288,10 @@ CoreFirebaseOptions::CoreFirebaseOptions( ios_bundle_id_(ios_bundle_id ? std::optional(*ios_bundle_id) : std::nullopt), app_group_id_(app_group_id ? std::optional(*app_group_id) - : std::nullopt) {} + : std::nullopt), + recaptcha_site_key_(recaptcha_site_key + ? std::optional(*recaptcha_site_key) + : std::nullopt) {} const std::string& CoreFirebaseOptions::api_key() const { return api_key_; } @@ -453,9 +457,23 @@ void CoreFirebaseOptions::set_app_group_id(std::string_view value_arg) { app_group_id_ = value_arg; } +const std::string* CoreFirebaseOptions::recaptcha_site_key() const { + return recaptcha_site_key_ ? &(*recaptcha_site_key_) : nullptr; +} + +void CoreFirebaseOptions::set_recaptcha_site_key( + const std::string_view* value_arg) { + recaptcha_site_key_ = + value_arg ? std::optional(*value_arg) : std::nullopt; +} + +void CoreFirebaseOptions::set_recaptcha_site_key(std::string_view value_arg) { + recaptcha_site_key_ = value_arg; +} + EncodableList CoreFirebaseOptions::ToEncodableList() const { EncodableList list; - list.reserve(14); + list.reserve(15); list.push_back(EncodableValue(api_key_)); list.push_back(EncodableValue(app_id_)); list.push_back(EncodableValue(messaging_sender_id_)); @@ -481,6 +499,8 @@ EncodableList CoreFirebaseOptions::ToEncodableList() const { : EncodableValue()); list.push_back(app_group_id_ ? EncodableValue(*app_group_id_) : EncodableValue()); + list.push_back(recaptcha_site_key_ ? EncodableValue(*recaptcha_site_key_) + : EncodableValue()); return list; } @@ -531,6 +551,11 @@ CoreFirebaseOptions CoreFirebaseOptions::FromEncodableList( if (!encodable_app_group_id.IsNull()) { decoded.set_app_group_id(std::get(encodable_app_group_id)); } + auto& encodable_recaptcha_site_key = list[14]; + if (!encodable_recaptcha_site_key.IsNull()) { + decoded.set_recaptcha_site_key( + std::get(encodable_recaptcha_site_key)); + } return decoded; } @@ -551,7 +576,9 @@ bool CoreFirebaseOptions::operator==(const CoreFirebaseOptions& other) const { other.android_client_id_) && PigeonInternalDeepEquals(ios_client_id_, other.ios_client_id_) && PigeonInternalDeepEquals(ios_bundle_id_, other.ios_bundle_id_) && - PigeonInternalDeepEquals(app_group_id_, other.app_group_id_); + PigeonInternalDeepEquals(app_group_id_, other.app_group_id_) && + PigeonInternalDeepEquals(recaptcha_site_key_, + other.recaptcha_site_key_); } bool CoreFirebaseOptions::operator!=(const CoreFirebaseOptions& other) const { @@ -574,6 +601,7 @@ size_t CoreFirebaseOptions::Hash() const { result = result * 31 + PigeonInternalDeepHash(ios_client_id_); result = result * 31 + PigeonInternalDeepHash(ios_bundle_id_); result = result * 31 + PigeonInternalDeepHash(app_group_id_); + result = result * 31 + PigeonInternalDeepHash(recaptcha_site_key_); return result; } diff --git a/packages/firebase_core/firebase_core/windows/messages.g.h b/packages/firebase_core/firebase_core/windows/messages.g.h index bce0a6a81f24..a55996f5b067 100644 --- a/packages/firebase_core/firebase_core/windows/messages.g.h +++ b/packages/firebase_core/firebase_core/windows/messages.g.h @@ -76,7 +76,8 @@ class CoreFirebaseOptions { const std::string* storage_bucket, const std::string* measurement_id, const std::string* tracking_id, const std::string* deep_link_u_r_l_scheme, const std::string* android_client_id, const std::string* ios_client_id, - const std::string* ios_bundle_id, const std::string* app_group_id); + const std::string* ios_bundle_id, const std::string* app_group_id, + const std::string* recaptcha_site_key); const std::string& api_key() const; void set_api_key(std::string_view value_arg); @@ -130,6 +131,10 @@ class CoreFirebaseOptions { void set_app_group_id(const std::string_view* value_arg); void set_app_group_id(std::string_view value_arg); + const std::string* recaptcha_site_key() const; + void set_recaptcha_site_key(const std::string_view* value_arg); + void set_recaptcha_site_key(std::string_view value_arg); + bool operator==(const CoreFirebaseOptions& other) const; bool operator!=(const CoreFirebaseOptions& other) const; /// Returns a hash code value for the object. This method is supported for the @@ -140,11 +145,9 @@ class CoreFirebaseOptions { static CoreFirebaseOptions FromEncodableList( const ::flutter::EncodableList& list); - public: public: ::flutter::EncodableList ToEncodableList() const; - private: private: friend class CoreInitializeResponse; friend class FirebaseCoreHostApi; @@ -164,6 +167,7 @@ class CoreFirebaseOptions { std::optional ios_client_id_; std::optional ios_bundle_id_; std::optional app_group_id_; + std::optional recaptcha_site_key_; }; // Generated class from Pigeon that represents data sent in messages. @@ -209,11 +213,9 @@ class CoreInitializeResponse { static CoreInitializeResponse FromEncodableList( const ::flutter::EncodableList& list); - public: public: ::flutter::EncodableList ToEncodableList() const; - private: private: friend class FirebaseCoreHostApi; friend class FirebaseAppHostApi; diff --git a/packages/firebase_core/firebase_core_platform_interface/lib/src/firebase_options.dart b/packages/firebase_core/firebase_core_platform_interface/lib/src/firebase_options.dart index ad0e580e88a8..dbc740a71ffe 100644 --- a/packages/firebase_core/firebase_core_platform_interface/lib/src/firebase_options.dart +++ b/packages/firebase_core/firebase_core_platform_interface/lib/src/firebase_options.dart @@ -50,6 +50,7 @@ class FirebaseOptions { this.iosClientId, this.iosBundleId, this.appGroupId, + this.recaptchaSiteKey, }); /// Named constructor to create [FirebaseOptions] from a the response of Pigeon channel. @@ -71,7 +72,8 @@ class FirebaseOptions { androidClientId = options.androidClientId, iosClientId = options.iosClientId, iosBundleId = options.iosBundleId, - appGroupId = options.appGroupId; + appGroupId = options.appGroupId, + recaptchaSiteKey = options.recaptchaSiteKey; /// Returns a copy of this FirebaseOptions with the given fields replaced with /// the new values. @@ -90,6 +92,7 @@ class FirebaseOptions { String? iosClientId, String? iosBundleId, String? appGroupId, + String? recaptchaSiteKey, }) { return FirebaseOptions( apiKey: apiKey ?? this.apiKey, @@ -106,6 +109,7 @@ class FirebaseOptions { iosClientId: iosClientId ?? this.iosClientId, iosBundleId: iosBundleId ?? this.iosBundleId, appGroupId: appGroupId ?? this.appGroupId, + recaptchaSiteKey: recaptchaSiteKey ?? this.recaptchaSiteKey, ); } @@ -174,6 +178,9 @@ class FirebaseOptions { /// This property is used on iOS only. final String? appGroupId; + /// The reCAPTCHA site key used for App Check. + final String? recaptchaSiteKey; + /// The current instance as a [Map]. Map get asMap { return { @@ -191,6 +198,7 @@ class FirebaseOptions { 'iosClientId': iosClientId, 'iosBundleId': iosBundleId, 'appGroupId': appGroupId, + 'recaptchaSiteKey': recaptchaSiteKey, }; } diff --git a/packages/firebase_core/firebase_core_platform_interface/lib/src/pigeon/messages.pigeon.dart b/packages/firebase_core/firebase_core_platform_interface/lib/src/pigeon/messages.pigeon.dart index 6d4123a1f1cb..9bb893bb3aba 100644 --- a/packages/firebase_core/firebase_core_platform_interface/lib/src/pigeon/messages.pigeon.dart +++ b/packages/firebase_core/firebase_core_platform_interface/lib/src/pigeon/messages.pigeon.dart @@ -126,6 +126,7 @@ class CoreFirebaseOptions { this.iosClientId, this.iosBundleId, this.appGroupId, + this.recaptchaSiteKey, }); String apiKey; @@ -156,6 +157,8 @@ class CoreFirebaseOptions { String? appGroupId; + String? recaptchaSiteKey; + List _toList() { return [ apiKey, @@ -172,6 +175,7 @@ class CoreFirebaseOptions { iosClientId, iosBundleId, appGroupId, + recaptchaSiteKey, ]; } @@ -196,6 +200,7 @@ class CoreFirebaseOptions { iosClientId: result[11] as String?, iosBundleId: result[12] as String?, appGroupId: result[13] as String?, + recaptchaSiteKey: result[14] as String?, ); } @@ -221,7 +226,8 @@ class CoreFirebaseOptions { _deepEquals(androidClientId, other.androidClientId) && _deepEquals(iosClientId, other.iosClientId) && _deepEquals(iosBundleId, other.iosBundleId) && - _deepEquals(appGroupId, other.appGroupId); + _deepEquals(appGroupId, other.appGroupId) && + _deepEquals(recaptchaSiteKey, other.recaptchaSiteKey); } @override diff --git a/packages/firebase_core/firebase_core_platform_interface/pigeons/messages.dart b/packages/firebase_core/firebase_core_platform_interface/pigeons/messages.dart index a2286f54f1a9..a42278d0f4e7 100644 --- a/packages/firebase_core/firebase_core_platform_interface/pigeons/messages.dart +++ b/packages/firebase_core/firebase_core_platform_interface/pigeons/messages.dart @@ -44,6 +44,7 @@ class CoreFirebaseOptions { required this.databaseURL, required this.storageBucket, required this.trackingId, + required this.recaptchaSiteKey, }); final String apiKey; @@ -73,6 +74,8 @@ class CoreFirebaseOptions { final String? iosBundleId; final String? appGroupId; + + final String? recaptchaSiteKey; } class CoreInitializeResponse { diff --git a/packages/firebase_core/firebase_core_platform_interface/test/firebase_options_test.dart b/packages/firebase_core/firebase_core_platform_interface/test/firebase_options_test.dart index 8b84f78e9525..91f66e2a03c0 100644 --- a/packages/firebase_core/firebase_core_platform_interface/test/firebase_options_test.dart +++ b/packages/firebase_core/firebase_core_platform_interface/test/firebase_options_test.dart @@ -91,6 +91,7 @@ void main() { iosClientId: 'newIosClientId', iosBundleId: 'newIosBundleId', appGroupId: 'newAppGroupId', + recaptchaSiteKey: 'newRecaptchaSiteKey', ); expect( @@ -110,6 +111,7 @@ void main() { iosClientId: 'newIosClientId', iosBundleId: 'newIosBundleId', appGroupId: 'newAppGroupId', + recaptchaSiteKey: 'newRecaptchaSiteKey', ), ); }); @@ -130,6 +132,7 @@ void main() { iosBundleId: 'iosBundleId', iosClientId: 'iosClientId', appGroupId: 'appGroupId', + recaptchaSiteKey: 'recaptchaSiteKey', ); expect(options.asMap, { @@ -147,6 +150,7 @@ void main() { 'iosBundleId': 'iosBundleId', 'iosClientId': 'iosClientId', 'appGroupId': 'appGroupId', + 'recaptchaSiteKey': 'recaptchaSiteKey', }); }); }); diff --git a/packages/firebase_core/firebase_core_web/lib/src/firebase_core_web.dart b/packages/firebase_core/firebase_core_web/lib/src/firebase_core_web.dart index a3ae6f933db6..f649fa1a2f5e 100644 --- a/packages/firebase_core/firebase_core_web/lib/src/firebase_core_web.dart +++ b/packages/firebase_core/firebase_core_web/lib/src/firebase_core_web.dart @@ -334,6 +334,7 @@ class FirebaseCoreWeb extends FirebasePlatform { // At this point, there is no default app so we need to create it with // the users options. + // TODO(recaptchaSiteKey): Pass recaptchaSiteKey if supported. app = firebase.initializeApp( apiKey: options!.apiKey, authDomain: options.authDomain, @@ -355,6 +356,7 @@ class FirebaseCoreWeb extends FirebasePlatform { ); try { + // TODO(recaptchaSiteKey): Pass recaptchaSiteKey if supported. app = firebase.initializeApp( name: name, apiKey: options!.apiKey,