diff --git a/packages/firebase_auth/firebase_auth/lib/src/firebase_auth.dart b/packages/firebase_auth/firebase_auth/lib/src/firebase_auth.dart index dd1720311f7d..ee5faedd7722 100644 --- a/packages/firebase_auth/firebase_auth/lib/src/firebase_auth.dart +++ b/packages/firebase_auth/firebase_auth/lib/src/firebase_auth.dart @@ -74,47 +74,6 @@ class FirebaseAuth extends FirebasePluginPlatform { return _delegate.languageCode; } - /// Changes this instance to point to an Auth emulator running locally. - /// - /// Set the [origin] of the local emulator, such as "http://localhost:9099" - /// - /// Note: Must be called immediately, prior to accessing auth methods. - /// Do not use with production credentials as emulator traffic is not encrypted. - /// - /// Note: auth emulator is not supported for web yet. firebase-js-sdk does not support - /// auth.useEmulator until v8.2.4, but FlutterFire does not support firebase-js-sdk v8+ yet - @Deprecated( - 'Will be removed in future release. ' - 'Use useAuthEmulator().', - ) - Future useEmulator(String origin) async { - assert(origin.isNotEmpty); - String mappedOrigin = origin; - - // Android considers localhost as 10.0.2.2 - automatically handle this for users. - if (defaultTargetPlatform == TargetPlatform.android && !kIsWeb) { - if (mappedOrigin.startsWith('http://localhost')) { - mappedOrigin = - mappedOrigin.replaceFirst('http://localhost', 'http://10.0.2.2'); - } else if (mappedOrigin.startsWith('http://127.0.0.1')) { - mappedOrigin = - mappedOrigin.replaceFirst('http://127.0.0.1', 'http://10.0.2.2'); - } - } - - // Native calls take the host and port split out - final hostPortRegex = RegExp(r'^http:\/\/([\w\d.]+):(\d+)$'); - final RegExpMatch? match = hostPortRegex.firstMatch(mappedOrigin); - if (match == null) { - throw ArgumentError('firebase.auth().useEmulator() origin format error'); - } - // Two non-empty groups in RegExp match - which is null-tested - these are non-null now - final String host = match.group(1)!; - final int port = int.parse(match.group(2)!); - - await useAuthEmulator(host, port); - } - /// Changes this instance to point to an Auth emulator running locally. /// /// Set the [host] of the local emulator, such as "localhost" @@ -646,19 +605,6 @@ class FirebaseAuth extends FirebasePluginPlatform { } } - /// Signs in with an AuthProvider using native authentication flow. This is - /// deprecated in favor of `signInWithProvider()`. - /// - /// A [FirebaseAuthException] maybe thrown with the following error code: - /// - **user-disabled**: - /// - Thrown if the user corresponding to the given email has been disabled. - @Deprecated('You should use signInWithProvider instead') - Future signInWithAuthProvider( - AuthProvider provider, - ) async { - return signInWithProvider(provider); - } - /// Signs in with an AuthProvider using native authentication flow. /// /// A [FirebaseAuthException] maybe thrown with the following error code: diff --git a/packages/firebase_auth/firebase_auth/lib/src/user.dart b/packages/firebase_auth/firebase_auth/lib/src/user.dart index 8497722bc974..7247177f3c73 100644 --- a/packages/firebase_auth/firebase_auth/lib/src/user.dart +++ b/packages/firebase_auth/firebase_auth/lib/src/user.dart @@ -641,10 +641,6 @@ class User { } /// Updates a user's profile data. - @Deprecated( - 'Will be removed in version 2.0.0. ' - 'Use updatePhotoURL and updateDisplayName instead.', - ) Future updateProfile({String? displayName, String? photoURL}) { return _delegate.updateProfile({ 'displayName': displayName,