Skip to content

Commit

Permalink
fix(auth): fix MFA issue where the error wouldn't be properly catched (
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyokone committed Jul 26, 2023
1 parent e925b4c commit 72fef03
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -466,7 +466,7 @@ - (void)handleMultiFactorError:(PigeonFirebaseApp *)app
FlutterError *_Nullable))completion
withError:(NSError *_Nullable)error {
#if TARGET_OS_OSX
completion(nil, [FlutterError errorWithCode:@"multi-factor-auth-required"
completion(nil, [FlutterError errorWithCode:@"second-factor-required"
message:error.description
details:nil]);
#else
Expand Down Expand Up @@ -508,7 +508,7 @@ - (void)handleMultiFactorError:(PigeonFirebaseApp *)app
kArgumentMultiFactorSessionId : sessionId,
kArgumentMultiFactorResolverId : resolverId,
};
completion(nil, [FlutterError errorWithCode:@"multi-factor-auth-required"
completion(nil, [FlutterError errorWithCode:@"second-factor-required"
message:error.description
details:output]);
#endif
Expand Down
Expand Up @@ -77,7 +77,7 @@ FirebaseException platformExceptionToFirebaseAuthException(

if (details != null) {
code = details['code'] ?? code;
if (code == 'second-factor-required') {
if (code == kMultiFactorError) {
return parseMultiFactorError(platformException);
}

Expand Down

0 comments on commit 72fef03

Please sign in to comment.