Skip to content

Define new error codes for passthrough errors. #601

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion auth/src/android/common_android.cc
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,11 @@ static const ErrorCodeMapping kFirebaseAuthCodes[] = {
{"ERROR_UNSUPPORTED_FIRST_FACTOR", kAuthErrorUnsupportedFirstFactor},
{"ERROR_EMAIL_CHANGE_NEEDS_VERIFICATION",
kAuthErrorEmailChangeNeedsVerification},
{"ERROR_USER_CANCELLED", kAuthErrorMissingOrInvalidNonce},
{"ERROR_MISSING_OR_INVALID_NONCE", kAuthErrorMissingOrInvalidNonce},
{"ERROR_USER_CANCELLED", kAuthErrorUserCancelled},
{"ERROR_UNSUPPORTED_PASSTHROUGH_OPERATION",
kAuthErrorUnsupportedPassthroughOperation},
{"ERROR_TOKEN_REFRESH_UNAVAILABLE", kAuthErrorTokenRefreshUnavailable},
{nullptr},
};

Expand Down
8 changes: 8 additions & 0 deletions auth/src/include/firebase/auth/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,14 @@ enum AuthError {
/// IDP sign-in.
kAuthErrorUserCancelled,

/// Indicates that a request was made to an unsupported backend endpoint in
/// passthrough mode.
kAuthErrorUnsupportedPassthroughOperation,

/// Indicates that a token refresh was requested, but neither a refresh token
/// nor a custom token provider is available.
kAuthErrorTokenRefreshUnavailable,

#endif // INTERNAL_EXEPERIMENTAL
};

Expand Down