Android Question Firebase Phone Authenticating

khaleel

Member
Licensed User
Longtime User
Any advice on a latest library to use for firebase phone authentication ?
I tried FirebaseAuthPhone Version: 1.9 but I get this error

'java.lang.Exception: Sub authphone_oncodesent signature does not match expected signature.'

any help is appreciated.
 

Enrico Fuoti

Active Member
Licensed User
Longtime User
Hello khaleel,
do you get the same error using the authsample demo ?
verify if in sub authphone_oncodesent event the parameters are correct.
 
Upvote 0

khaleel

Member
Licensed User
Longtime User
they are okay.
I worked on the same sample code with little modification.
I've downloaded my 'google-services.json' from firebase and changed project package name to match that on firebase.

this is a screenshot after the error is raised
 
Upvote 0

Enrico Fuoti

Active Member
Licensed User
Longtime User
Hello Khaleel,
Actually, in the latest version of the library, the parameters are different from the one used in previous versions of the lib.
My fault, I forgot to update the changes in the event description of the first thread.
The code you are testing was originally working with the previous versions of the lib?
in this case your app should raise the error when you upgraded the library to 1.9
you should make sure that the parameters are as the ones you can see below.


B4X:
'-------------------------------
Sub authphone_oncodesent(success As Boolean, verificationid As String, token As String)
'--------------------------------
    If success = True And gb_phoneVerificationSuccess = False Then
        gs_verificationID = verificationid
        Activity.RemoveAllViews
        Activity.LoadLayout("phonelogin")
        fet_phonenumber.text = gs_phoneNumber
    End If
    Log("authphone_oncodesent success" & success)
End Sub
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…