Closed JobiJoba closed 9 months ago
Hi @JobiJoba, I just tested the firebase_ui_auth example code and I did not get any issue with the underlying auth package. Can you provide a minimal sample in a repo that we can clone so that we can investigate this?
@danagbemava-nc
Hi, that doesn't seems to be an iOS phone that you are trying with. Let me check if it works on Android.
I confirm, on Android it works but not iOS :(
Hmmm I try the example project and it works ... I'll try to reproduce my issue in a repo.
I don't know if it's because I'm on a multiple flavors environment or something else.
Hi,
I've created a repo showing the issue. I did it without multiple flavors because the issue arise there already.
https://github.com/JobiJoba/issuefirebaseauthuilogin
If you need anything else please let me know
The error is leading to this
throw PlatformException(
code: replyList[0]! as String,
message: replyList[1] as String?,
details: replyList[2],
);
[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: type 'int' is not a subtype of type 'String' in type cast
#0 FirebaseAuthHostApi.signInWithCredential
messages.pigeon.dart:1068
<asynchronous suspension>
#1 MethodChannelFirebaseAuth.signInWithCredential
method_channel_firebase_auth.dart:295
<asynchronous suspension>
#2 FirebaseAuth.signInWithCredential
firebase_auth.dart:517
<asynchronous suspension>
Looking deeper into this ... maybe the issue should be created in Firebase Auth itself... what I don't understand is why the example project works.
In my example repo I try the following which mimic what the Sign in with EmailAuthProvider do
final cred = EmailAuthProvider.credential(
email: "fdsfsdfsdf@dsfdsf.com", password: "dsdsdsdsdsd");
FirebaseAuth.instance.signInWithCredential(cred);
and I get the same issue, If I use the method signInWithEmail it works as expected.
Do you think I should create an issue in Firebase Auth repository ?
Hi @JobiJoba, yes, this should be reported on the flutterfire repo.
Kindly refile this on the flutterfire repo.
Closing from here.
Thank you
Is there an existing issue for this?
What plugin is this bug for?
Firebase UI Auth
What platform(s) does this bug affect?
iOS
List of dependencies used.
flutter pub deps -s list
Steps to reproduce
I've configured my providers like this in main:
I'm using the default SignIn page
I'm then putting wrong credentials as EMAIL AND PASSWORD (Valid email) and following exception is thrown:
Expected Behavior
An error message should be shown instead of a crash due to a wrong cast. With correct sign in information, it logged in correctly.
Actual Behavior
When we try to login, it just spin a circular progress instead of the login button but it's because it crash behind the scene
Additional Information
No response