Skip to content

[firebase_auth] Fixes completely broken reauthenticateWithCredential method. #300

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

Closed
Closed
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
4 changes: 4 additions & 0 deletions packages/firebase_auth/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.14.0+7

* Fixes broken `reauthenticateWithCredential` method on both Android and iOS.

## 0.14.0+6

* Update example app with correct const constructors.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,8 @@ private void handleReauthenticateWithCredential(
AuthCredential credential = getCredential((Map<String, Object>) call.arguments());

currentUser
.reauthenticate(credential)
.addOnCompleteListener(new TaskVoidCompleteListener(result));
.reauthenticateAndRetrieveData(credential)
.addOnCompleteListener(new SignInCompleteListener(result));
}

private void handleUnlinkFromProvider(MethodCall call, Result result, FirebaseAuth firebaseAuth) {
Expand Down
4 changes: 2 additions & 2 deletions packages/firebase_auth/ios/Classes/FirebaseAuthPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,9 @@ - (void)handleMethodCall:(FlutterMethodCall *)call result:(FlutterResult)result
} else if ([@"reauthenticateWithCredential" isEqualToString:call.method]) {
[[self getAuth:call.arguments].currentUser
reauthenticateAndRetrieveDataWithCredential:[self getCredential:call.arguments]
completion:^(FIRAuthDataResult *r,
completion:^(FIRAuthDataResult *authResult,
NSError *_Nullable error) {
[self sendResult:result forObject:nil error:error];
[self sendResult:result forAuthDataResult:authResult error:error];
}];
} else if ([@"linkWithCredential" isEqualToString:call.method]) {
[[self getAuth:call.arguments].currentUser
Expand Down
2 changes: 1 addition & 1 deletion packages/firebase_auth/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Flutter plugin for Firebase Auth, enabling Android and iOS
like Google, Facebook and Twitter.
author: Flutter Team <[email protected]>
homepage: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_auth
version: 0.14.0+6
version: 0.14.0+7

flutter:
plugin:
Expand Down