-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[firebase_auth] Ability to choose between sign-in or link on auto verification of phone number on Android #973
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could the 2 onComplete handlers be merged?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ened completed the requested changes
.../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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |