Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
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
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.8.2

* Fixed `linkWithCredential` on Android.

## 0.8.1+5

* Added a driver test.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public void onMethodCall(MethodCall call, Result result) {
handleReauthenticateWithCredential(call, result, getAuth(call));
break;
case "linkWithCredential":
handleLinkWithEmailAndPassword(call, result, getAuth(call));
handleLinkWithCredential(call, result, getAuth(call));
break;
case "unlinkFromProvider":
handleUnlinkFromProvider(call, result, getAuth(call));
Expand Down Expand Up @@ -264,19 +264,15 @@ private Map<String, Object> getVerifyPhoneNumberExceptionMap(FirebaseException e
return exceptionMap;
}

private void handleLinkWithEmailAndPassword(
MethodCall call, Result result, FirebaseAuth firebaseAuth) {
private void handleLinkWithCredential(MethodCall call, Result result, FirebaseAuth firebaseAuth) {
final FirebaseUser currentUser = firebaseAuth.getCurrentUser();
if (currentUser == null) {
markUserRequired(result);
return;
}

Map<String, String> arguments = call.arguments();
String email = arguments.get("email");
String password = arguments.get("password");

AuthCredential credential = EmailAuthProvider.getCredential(email, password);
@SuppressWarnings("unchecked")
AuthCredential credential = getCredential((Map<String, Object>) call.arguments);

currentUser
.linkWithCredential(credential)
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 <flutter-dev@googlegroups.com>
homepage: https://github.com/flutter/plugins/tree/master/packages/firebase_auth
version: "0.8.1+5"
version: "0.8.2"

flutter:
plugin:
Expand Down