[firebase_auth] Ability to choose between sign-in or link on auto verification of phone number on Android#973
[firebase_auth] Ability to choose between sign-in or link on auto verification of phone number on Android#973cqhchan wants to merge 6 commits intoflutter:masterfrom
Conversation
cqhchan
commented
Dec 8, 2018
- Fixed Android Link with credentials bug.
- Added in ability to choose between sign-in or link on auto verification of phone number
- Added in ability to choose between sign-in or link on auto verification of phone number
| @required PhoneVerificationFailed verificationFailed, | ||
| @required PhoneCodeSent codeSent, | ||
| @required PhoneCodeAutoRetrievalTimeout codeAutoRetrievalTimeout, | ||
| bool linkCredentials = false}) async { |
There was a problem hiding this comment.
Could you please add back the comma (,) at the end of the array setup and reformat?
| if (task.isSuccessful()) { | ||
| Map<String, Object> arguments = new HashMap<>(); | ||
| arguments.put("handle", handle); | ||
| channel.invokeMethod("phoneVerificationCompleted", arguments); |
There was a problem hiding this comment.
Could the 2 onComplete handlers be merged?
.../firebase_auth/android/src/main/java/io/flutter/plugins/firebaseauth/FirebaseAuthPlugin.java
Outdated
Show resolved
Hide resolved
|
@ened completed the requested changes |
|
Insert this into pubspec.yaml to use it. https://github.com/cqhchan/plugins This makes use of credentials implementation in #928 |
|
Thanks for the contribution! We've fixed the linkWithCredential issue (#1333). I'd love to get the other parts of your change, but I think we need an iOS implementation. Before we land this I'd ideally like to figure out how to write integration tests for phone auth so that we know the functionality is working on all platforms. |
|
@cqhchan -- Please let me know if you'd like to implement the iOS side of the pull request or if you want to abandon this PR. Thanks! |
|
hi @collinjackson , Im not too sure what IOS side u are referring to. The bug only appeared in Android. Regarding the additional feature to enable auto phone number verification, again it is an Android only feature in selected Android phones that support it |
collinjackson
left a comment
There was a problem hiding this comment.
OK, you're right -- this is an Android-only feature.
|
|
||
| @Override | ||
| public void onComplete(@NonNull Task<AuthResult> task) { | ||
| if (task.isSuccessful()) { |
There was a problem hiding this comment.
It seems like we should report errors back to the Dart side rather than swallowing them
|
@collinjackson Is this going to be merged soon then? (considering the comment) |
|
The API design in #1568 seems preferable to me, so I'm closing this one. |