Skip to content

Commit 92db798

Browse files
authored
Merge pull request #601 from firebase/rosalyntan.errorcode
Define new error codes for passthrough errors.
2 parents 11c7349 + 0329f73 commit 92db798

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

auth/src/android/common_android.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,11 @@ static const ErrorCodeMapping kFirebaseAuthCodes[] = {
115115
{"ERROR_UNSUPPORTED_FIRST_FACTOR", kAuthErrorUnsupportedFirstFactor},
116116
{"ERROR_EMAIL_CHANGE_NEEDS_VERIFICATION",
117117
kAuthErrorEmailChangeNeedsVerification},
118-
{"ERROR_USER_CANCELLED", kAuthErrorMissingOrInvalidNonce},
118+
{"ERROR_MISSING_OR_INVALID_NONCE", kAuthErrorMissingOrInvalidNonce},
119+
{"ERROR_USER_CANCELLED", kAuthErrorUserCancelled},
120+
{"ERROR_UNSUPPORTED_PASSTHROUGH_OPERATION",
121+
kAuthErrorUnsupportedPassthroughOperation},
122+
{"ERROR_TOKEN_REFRESH_UNAVAILABLE", kAuthErrorTokenRefreshUnavailable},
119123
{nullptr},
120124
};
121125

auth/src/include/firebase/auth/types.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,14 @@ enum AuthError {
419419
/// IDP sign-in.
420420
kAuthErrorUserCancelled,
421421

422+
/// Indicates that a request was made to an unsupported backend endpoint in
423+
/// passthrough mode.
424+
kAuthErrorUnsupportedPassthroughOperation,
425+
426+
/// Indicates that a token refresh was requested, but neither a refresh token
427+
/// nor a custom token provider is available.
428+
kAuthErrorTokenRefreshUnavailable,
429+
422430
#endif // INTERNAL_EXEPERIMENTAL
423431
};
424432

0 commit comments

Comments
 (0)