arafaysaleem / message_app

A Flutter messaging app with firebase backend
MIT License
53 stars 22 forks source link

Phone verification issue #4

Closed Lee-Martin-KOS closed 2 years ago

Lee-Martin-KOS commented 3 years ago

Hi Guys,

First of all very nice app, i have installed the app to test but getting phone verification error something i have done wrong?

Regards Martin

arafaysaleem commented 3 years ago

Thankyou! First off I need to remind you that this app was made pre null safety release so the code won't work with the latest flutter version.

Secondly, there could be two reasons why you are getting that error:

  1. You didn't setup your own firebase phone auth and added your own google-services.json
  2. If you have done the above already, then maybe the issue arises due to the isPhoneNumber method or parsePhoneNo method. Both of these methods were made to only allow Pakistani mobile numbers. Try adjusting their logic for your own numbers. I'm posting the link to these methods.

https://github.com/arafaysaleem/message_app/blob/32890589c0f06bab67fb8cbf32db8116a7ecb678/lib/helper/utils.dart#L86

https://github.com/arafaysaleem/message_app/blob/32890589c0f06bab67fb8cbf32db8116a7ecb678/lib/helper/utils.dart#L80