B4A Library Firebase phone number authentication

Enrico Fuoti

Active Member
Licensed User
Longtime User
yes, i think the problem i haved in my project.

the captcha window, autoclose before select objects... ( anything from my app triger and close this window captcha )
is possible dissable windows captcha ?
I don't get the captcha request on my project. It may be related to a missing SHA-2 key
Try to go to your firebase project console and check SHA2 key. then re-download your google-services.json
 

scsjc

Well-Known Member
Licensed User
Longtime User
I don't get the captcha request on my project. It may be related to a missing SHA-2 key
Try to go to your firebase project console and check SHA2 key. then re-download your google-services.json

i have this configuration on firebase, not see SHA2, only see SHA-1 and SHA-256




The captcha asks me when it fires authphone_oncodesent .... with .... success=true and verificationid exists
the captcha that appears to me is to verify that a human is on the screen
 

scsjc

Well-Known Member
Licensed User
Longtime User

yes i have a value in SHA-256
 
all the library versions before the 1.8 version do not work with b4a 12.
the 1.8 version has 2 problems 1st if we put the manual code wrong it is crashing, 2nd it is asking for a captcha every time we need to do verification.

i hope that you can find a solution for this issue

 

Enrico Fuoti

Active Member
Licensed User
Longtime User
Hello Madrigal,
The 1.8 version is compiled with latest firebase sdk. I tested with sample project and worked fine. I did not get the errors you mentioned.
download the apk in the following link and test it. let me know if it works on your device,
It is compiled with b4a 12.
https://www.dropbox.com/s/bgn8isn5eyr9d0c/authsample.zip?dl=1
If it works, the problem may be in firebase sdk. It looks like there is an issue with it that affects apps that are published on playstore and have a long name.
 
the example that you sent me takes the phone number from the device and does auto verification, this is working fine with me, my case is if we want to enter the verification code manually if i put the code correct there is no problem but if i put the code wrong the app crashes.
pls note i made sure that i have the correct sdk and all i have downloaded is correct

kindly try the case that i am asking about once you put the code wrong

thank you
 

Enrico Fuoti

Active Member
Licensed User
Longtime User
I added a new version on first post that should have fixed the bug.
 

hitesh.k

Member
Hello thanks for lib is authsample program is working because i am getting error invalid phone number. when i check in loger phone number was not starting with + sign so i manualy add that then error came
 

Attachments

  • Screenshot_20230311_163933.jpg
    293 KB · Views: 186

Enrico Fuoti

Active Member
Licensed User
Longtime User
Hello Hitesh,
I think is better to start a new thread for this.
The message refers to a SafetyNet verification problem.
This is normally happens when you did not set both SHA1 and SHA256 keys correctly,
but if you're testing the authsample demo, this is not the case.
The authsample works nicely on my phone.
Normally you sould not need to manually add/edit phone number,
it looks like in some phones the number is returned without international prefix
Firebase needs the number in international format having + country code at beginning.
Are you testing on a real device or emulator?
Have you tested the authsample on a second phone ?
 

Enrico Fuoti

Active Member
Licensed User
Longtime User
Hitesh,
I'm not sure, to understand, what exactly happens with your phone.
We should also verify if your country or phone provider is supported by Firebase.
please create a new thread or write me with a private message,
We'll try to identify the issue and a possible solution.
 

hitesh.k

Member
Ok thanks
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…