File tree

2 files changed

+44
-22
lines changed

2 files changed

+44
-22
lines changed
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@ public enum AuthErrorReason
66
/// Unknown error reason.
77
/// </summary>
88
Undefined,
9-
/// <summary>
10-
/// The user was disabled and is not granted access anymore.
11-
/// </summary>
12-
UserDisabled,
9+
/// <summary>
10+
/// The sign in method is not enabled.
11+
/// </summary>
12+
OperationNotAllowed,
13+
/// <summary>
14+
/// The user was disabled and is not granted access anymore.
15+
/// </summary>
16+
UserDisabled,
1317
/// <summary>
1418
/// The user was not found
1519
/// </summary>
@@ -62,14 +66,22 @@ public enum AuthErrorReason
6266
/// Email/Password Signin: The supplied password is not valid for the email address.
6367
/// </summary>
6468
WrongPassword,
65-
/// <summary>
66-
/// Password Recovery: Request does not contain a value for parameter: requestType or supplied value is invalid.
67-
/// </summary>
68-
MissingRequestType,
69-
/// <summary>
70-
/// Account Linking: Authenticated User ID Token is invalid!
71-
/// </summary>
72-
InvalidIDToken,
69+
/// <summary>
70+
/// Email/Password Signin: Too many password login have been attempted. Try again later.
71+
/// </summary>
72+
TooManyAttemptsTryLater,
73+
/// <summary>
74+
/// Password Recovery: Request does not contain a value for parameter: requestType or supplied value is invalid.
75+
/// </summary>
76+
MissingRequestType,
77+
/// <summary>
78+
/// Password Recovery: Reset password limit exceeded.
79+
/// </summary>
80+
ResetPasswordExceedLimit,
81+
/// <summary>
82+
/// Account Linking: Authenticated User ID Token is invalid!
83+
/// </summary>
84+
InvalidIDToken,
7385
/// <summary>
7486
/// Linked Accounts: Request does not contain a value for parameter: identifier.
7587
/// </summary>
@@ -82,5 +94,5 @@ public enum AuthErrorReason
8294
/// Linked accounts: account to link has already been linked.
8395
/// </summary>
8496
AlreadyLinked
85-
}
97+
}
8698
}
Original file line numberDiff line numberDiff line change
@@ -519,8 +519,12 @@ private static AuthErrorReason GetFailureReason(string responseData)
519519
failureReason = AuthErrorReason.LoginCredentialsTooOld;
520520
break;
521521

522-
//possible errors from Third Party Authentication using GoogleIdentityUrl
523-
case "INVALID_PROVIDER_ID : Provider Id is not supported.":
522+
case "OPERATION_NOT_ALLOWED":
523+
failureReason = AuthErrorReason.OperationNotAllowed;
524+
break;
525+
526+
//possible errors from Third Party Authentication using GoogleIdentityUrl
527+
case "INVALID_PROVIDER_ID : Provider Id is not supported.":
524528
failureReason = AuthErrorReason.InvalidProviderID;
525529
break;
526530
case "MISSING_REQUEST_URI":
@@ -536,10 +540,10 @@ private static AuthErrorReason GetFailureReason(string responseData)
536540
break;
537541
case "MISSING_PASSWORD":
538542
failureReason = AuthErrorReason.MissingPassword;
539-
break;
543+
break;
540544

541-
//possible errors from Email/Password Account Signup (via signupNewUser or setAccountInfo)
542-
case "WEAK_PASSWORD : Password should be at least 6 characters":
545+
//possible errors from Email/Password Account Signup (via signupNewUser or setAccountInfo)
546+
case "WEAK_PASSWORD : Password should be at least 6 characters":
543547
failureReason = AuthErrorReason.WeakPassword;
544548
break;
545549
case "EMAIL_EXISTS":
@@ -561,14 +565,20 @@ private static AuthErrorReason GetFailureReason(string responseData)
561565
case "USER_DISABLED":
562566
failureReason = AuthErrorReason.UserDisabled;
563567
break;
568+
case "TOO_MANY_ATTEMPTS_TRY_LATER":
569+
failureReason = AuthErrorReason.TooManyAttemptsTryLater;
570+
break;
564571

565-
//possible errors from Email/Password Signin or Password Recovery or Email/Password Sign up using setAccountInfo
566-
case "MISSING_EMAIL":
572+
//possible errors from Email/Password Signin or Password Recovery or Email/Password Sign up using setAccountInfo
573+
case "MISSING_EMAIL":
567574
failureReason = AuthErrorReason.MissingEmail;
568575
break;
576+
case "RESET_PASSWORD_EXCEED_LIMIT":
577+
failureReason = AuthErrorReason.ResetPasswordExceedLimit;
578+
break;
569579

570-
//possible errors from Password Recovery
571-
case "MISSING_REQ_TYPE":
580+
//possible errors from Password Recovery
581+
case "MISSING_REQ_TYPE":
572582
failureReason = AuthErrorReason.MissingRequestType;
573583
break;
574584

0 commit comments

Comments
 (0)