FirebaseAuthEx - Extends FirebaseAuth functionality

alimanam3386

Active Member
Licensed User
Longtime User
i was able to add a solution for the login (sucess or not) but the createnew user will raise an exception if there is already such a user... I can´t find a fix to get the error message

Ok thank you man , and when you release updated lib ?
 

DonManfred

Expert
Licensed User
Longtime User

I´m using v1.14

B4X:
Sub btnSignInwithEmailandPassword_Click
    Log($"btnSignInwithEmailandPassword_Click()"$)
    'anon.createUserWithEmailAndPassword("msy@gmx.de","kallekalle")
    anon.SignInWithEmailAndPassword("email","wrongpassword")
End Sub

Sub anon_SignedIn (success As Boolean, User As FirebaseAuthUser, info As String)
    Log($"anon_SignedIn(${success},${info})"$)
    If success Then
        If User = Null Then
            Log("nulluser SignedIn: ")
        Else   
            Log("SignedIn: " & User.Uid)
            Log("User: " & User.DisplayName)
            Log("eMail: " & User.Email)
            Log("Anonymously: " & User.Anonymous)
            Log("Email  verified: " & User.EmailVerified)
            If User.EmailVerified = False Then
                'Log("Email verification request")
                'User.sendEmailVerification
            End If
        End If
        Log("SignedIn: " & User.DisplayName)
[...]
End sub
 

alimanam3386

Active Member
Licensed User
Longtime User
you should not try to catch it... the workaround will not work in try catch block i guess

But as you can see I didn't use try catch block code in "signedIn" event , And also the " UserCreated " event still not work (even if you define the object in activity )
 

Gentry

Member
Licensed User
Longtime User
I am trying to access the providerData list elements in order to get the google ID from the google login provider, however the providerData List returns object references instead of a list or map of actual data values like this:

B4X:
com.google.android.gms.internal.zzafs@e1e82ab
com.google.android.gms.internal.zzafs@a0fed08

How can I access the actual data values from these object references?

Thanks for the extension and your help!

Gentry
 

roberto67

New Member
Licensed User
Longtime User
hi,
Method: createUserWithEmailAndPassword (email As String, password As String)works perfectly,
but when I try to register a user with an existing email, i get an error message that I do not know how to handle:
createUserWithEmail: onComplete: false
com.google.android.gms.tasks.RuntimeExecutionException: com.google.firebase.auth.FirebaseAuthUserCollisionException: The email address is already in use by another account.
Then the program stop and i do not know what to do.
Can you help me?
 

roberto67

New Member
Licensed User
Longtime User
hi,
method, "createUserWithEmailAndPassword" works perfectly,
but when I try to register a user with the same email i get an error message that I do not know how to handle:

"createUserWithEmail: onComplete: false
com.google.android.gms.tasks.RuntimeExecutionException: com.google.firebase.auth.FirebaseAuthUserCollisionException: The email address is already in use by another account."

I do not know what to do. Can you help me?
 

roberto67

New Member
Licensed User
Longtime User
Thank you Manfred,
but the problem has not been resolved. If the user mail does not exist, or if the password is wrong, I can see the mistakes in the:
"Sub anon_SignedIn (success As Boolean, User As FirebaseAuthUser, info As String)" properly,
but if I try to create a new user with a mail already exists, the SUB_Signedin does not detect this error and the program stops working.
 

Robert_Rm

Member
Licensed User
And Please check the " AuthEx_UserCreated " EVENT . when you create new user by " createUserWithEmailAndPassword " Function , The Event for UserCreated NOT work correctly .

Cheers Man
Hi,
my program has a similar problem. When i try to create new user with method "createUserWithemailAndPassword", if the email has already been used previously, the program stop. Can you help me?
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…