@@ -74,47 +74,6 @@ class FirebaseAuth extends FirebasePluginPlatform {
7474 return _delegate.languageCode;
7575 }
7676
77- /// Changes this instance to point to an Auth emulator running locally.
78- ///
79- /// Set the [origin] of the local emulator, such as "http://localhost:9099"
80- ///
81- /// Note: Must be called immediately, prior to accessing auth methods.
82- /// Do not use with production credentials as emulator traffic is not encrypted.
83- ///
84- /// Note: auth emulator is not supported for web yet. firebase-js-sdk does not support
85- /// auth.useEmulator until v8.2.4, but FlutterFire does not support firebase-js-sdk v8+ yet
86- @Deprecated (
87- 'Will be removed in future release. '
88- 'Use useAuthEmulator().' ,
89- )
90- Future <void > useEmulator (String origin) async {
91- assert (origin.isNotEmpty);
92- String mappedOrigin = origin;
93-
94- // Android considers localhost as 10.0.2.2 - automatically handle this for users.
95- if (defaultTargetPlatform == TargetPlatform .android && ! kIsWeb) {
96- if (mappedOrigin.startsWith ('http://localhost' )) {
97- mappedOrigin =
98- mappedOrigin.replaceFirst ('http://localhost' , 'http://10.0.2.2' );
99- } else if (mappedOrigin.startsWith ('http://127.0.0.1' )) {
100- mappedOrigin =
101- mappedOrigin.replaceFirst ('http://127.0.0.1' , 'http://10.0.2.2' );
102- }
103- }
104-
105- // Native calls take the host and port split out
106- final hostPortRegex = RegExp (r'^http:\/\/([\w\d.]+):(\d+)$' );
107- final RegExpMatch ? match = hostPortRegex.firstMatch (mappedOrigin);
108- if (match == null ) {
109- throw ArgumentError ('firebase.auth().useEmulator() origin format error' );
110- }
111- // Two non-empty groups in RegExp match - which is null-tested - these are non-null now
112- final String host = match.group (1 )! ;
113- final int port = int .parse (match.group (2 )! );
114-
115- await useAuthEmulator (host, port);
116- }
117-
11877 /// Changes this instance to point to an Auth emulator running locally.
11978 ///
12079 /// Set the [host] of the local emulator, such as "localhost"
@@ -646,19 +605,6 @@ class FirebaseAuth extends FirebasePluginPlatform {
646605 }
647606 }
648607
649- /// Signs in with an AuthProvider using native authentication flow. This is
650- /// deprecated in favor of `signInWithProvider()` .
651- ///
652- /// A [FirebaseAuthException] maybe thrown with the following error code:
653- /// - **user-disabled**:
654- /// - Thrown if the user corresponding to the given email has been disabled.
655- @Deprecated ('You should use signInWithProvider instead' )
656- Future <UserCredential > signInWithAuthProvider (
657- AuthProvider provider,
658- ) async {
659- return signInWithProvider (provider);
660- }
661-
662608 /// Signs in with an AuthProvider using native authentication flow.
663609 ///
664610 /// A [FirebaseAuthException] maybe thrown with the following error code:
0 commit comments