Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ public class AuthErrorHandlerTest
ErrorCode.NotFound,
AuthErrorCode.UserNotFound,
},
new object[]
{
"EMAIL_NOT_FOUND",
ErrorCode.NotFound,
AuthErrorCode.EmailNotFound,
},
};

[Theory]
Expand Down
7 changes: 7 additions & 0 deletions FirebaseAdmin/FirebaseAdmin/Auth/AuthErrorCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,12 @@ public enum AuthErrorCode
/// Tenant ID in a token does not match.
/// </summary>
TenantIdMismatch,

/// <summary>
/// No user record found for the given email, typically raised when
/// generating a password reset link using an email for a user that
/// is not already registered.
/// </summary>
EmailNotFound,
}
}
7 changes: 7 additions & 0 deletions FirebaseAdmin/FirebaseAdmin/Auth/AuthErrorHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ internal sealed class AuthErrorHandler
AuthErrorCode.EmailAlreadyExists,
"The user with the provided email already exists")
},
{
"EMAIL_NOT_FOUND",
new ErrorInfo(
ErrorCode.NotFound,
AuthErrorCode.EmailNotFound,
"No user record found for the given email")
},
{
"INVALID_DYNAMIC_LINK_DOMAIN",
new ErrorInfo(
Expand Down