Skip to content

Commit 978ac42

Browse files
Googlera-maurice
authored andcommitted
Adds error handling for ERROR_USER_CANCELLED for cpp wrapper.
PiperOrigin-RevId: 277377930
1 parent 1ccb711 commit 978ac42

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

auth/src/android/common_android.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ static const ErrorCodeMapping kFirebaseAuthCodes[] = {
115115
{"ERROR_UNSUPPORTED_FIRST_FACTOR", kAuthErrorUnsupportedFirstFactor},
116116
{"ERROR_EMAIL_CHANGE_NEEDS_VERIFICATION",
117117
kAuthErrorEmailChangeNeedsVerification},
118+
{"ERROR_USER_CANCELLED", kAuthErrorMissingOrInvalidNonce},
118119
{nullptr},
119120
};
120121

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,11 @@ enum AuthError {
416416
/// This can happen if the hash of the provided raw nonce did not match the
417417
/// hashed nonce in the OIDC ID token payload.
418418
kAuthErrorMissingOrInvalidNonce,
419+
420+
/// Indicates that the user did not authorize the application during Generic
421+
/// IDP sign-in.
422+
kAuthErrorUserCancelled,
423+
419424
#endif // INTERNAL_EXEPERIMENTAL
420425
};
421426

0 commit comments

Comments
 (0)