@@ -21,15 +21,6 @@ void defaultOnAuthError(AuthProvider provider, Object error) {
21
21
return ;
22
22
}
23
23
24
- if (error.code == 'account-exists-with-different-credential' ) {
25
- final email = error.email;
26
- if (email == null ) {
27
- throw error;
28
- }
29
-
30
- provider.findProvidersForEmail (email, error.credential);
31
- }
32
-
33
24
throw error;
34
25
}
35
26
@@ -39,7 +30,6 @@ void defaultOnAuthError(AuthProvider provider, Object error) {
39
30
/// - [EmailAuthListener]
40
31
/// - [EmailLinkAuthListener]
41
32
/// - [PhoneAuthListener]
42
- /// - [UniversalEmailSignInListener]
43
33
abstract class AuthListener {
44
34
/// Current [AuthProvider] that is being used to authenticate the user.
45
35
AuthProvider get provider;
@@ -64,9 +54,17 @@ abstract class AuthListener {
64
54
void onCredentialLinked (AuthCredential credential);
65
55
66
56
/// Called before an attempt to fetch available providers for the email.
57
+ @Deprecated (
58
+ 'Email enumeration protection is on by default.'
59
+ 'Read more here https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection' ,
60
+ )
67
61
void onBeforeProvidersForEmailFetch ();
68
62
69
63
/// Called when available providers for the email were successfully fetched.
64
+ @Deprecated (
65
+ 'Email enumeration protection is on by default.'
66
+ 'Read more here https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection' ,
67
+ )
70
68
void onDifferentProvidersFound (
71
69
String email,
72
70
List <String > providers,
@@ -139,6 +137,10 @@ abstract class AuthProvider<T extends AuthListener, K extends AuthCredential> {
139
137
}
140
138
141
139
/// Fetches available providers for the given [email] .
140
+ @Deprecated (
141
+ 'Email enumeration protection is on by default.'
142
+ 'Read more here https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection' ,
143
+ )
142
144
void findProvidersForEmail (
143
145
String email, [
144
146
AuthCredential ? credential,
0 commit comments