Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 44 additions & 5 deletions android/app/google-services.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,60 @@
{
"project_info": {
"project_number": "1041206382731",
"project_id": "phone-auth-15bdb",
"storage_bucket": "phone-auth-15bdb.appspot.com"
"project_number": "109702891880",
"firebase_url": "https://addis-ride-cb04b-default-rtdb.firebaseio.com",
"project_id": "addis-ride-cb04b",
"storage_bucket": "addis-ride-cb04b.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:1041206382731:android:3bd02e417c5123ef45448e",
"mobilesdk_app_id": "1:109702891880:android:13623a19dbb652770ceedd",
"android_client_info": {
"package_name": "com.example.phone_auth_firebase_tutorial"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyDNgBCk6Y24KvTFf-Kz5lsMaCgPN7YDZLA"
"current_key": "AIzaSyAR2CkwmIQd7-ev4q2jIq5TMcy-jpVKAyQ"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:109702891880:android:d89654ec0caa3efa0ceedd",
"android_client_info": {
"package_name": "com.genesis.addis_ride_driver"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyAR2CkwmIQd7-ev4q2jIq5TMcy-jpVKAyQ"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:109702891880:android:ca8726093cbf698d0ceedd",
"android_client_info": {
"package_name": "com.genesis.addis_ride_passenger"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyAR2CkwmIQd7-ev4q2jIq5TMcy-jpVKAyQ"
}
],
"services": {
Expand Down
2 changes: 1 addition & 1 deletion lib/controllers/auth_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class AuthService {
await _firebaseAuth
.verifyPhoneNumber(
timeout: Duration(seconds: 30),
phoneNumber: "+91$phone",
phoneNumber: "+251$phone",
verificationCompleted: (phoneAuthCredential) async {
return;
},
Expand Down
11 changes: 6 additions & 5 deletions lib/firebase_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,11 @@ class DefaultFirebaseOptions {
}

static const FirebaseOptions android = FirebaseOptions(
apiKey: 'AIzaSyDNgBCk6Y24KvTFf-Kz5lsMaCgPN7YDZLA',
appId: '1:1041206382731:android:3bd02e417c5123ef45448e',
messagingSenderId: '1041206382731',
projectId: 'phone-auth-15bdb',
storageBucket: 'phone-auth-15bdb.appspot.com',
apiKey: 'AIzaSyAR2CkwmIQd7-ev4q2jIq5TMcy-jpVKAyQ',
appId: '1:109702891880:android:13623a19dbb652770ceedd',
messagingSenderId: '109702891880',
projectId: 'addis-ride-cb04b',
databaseURL: 'https://addis-ride-cb04b-default-rtdb.firebaseio.com',
storageBucket: 'addis-ride-cb04b.appspot.com',
);
}
5 changes: 2 additions & 3 deletions lib/pages/login_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,12 @@ class _LoginPageState extends State<LoginPage>
controller: _phoneContoller,
keyboardType: TextInputType.phone,
decoration: InputDecoration(
prefixText: "+91 ",
prefixText: "+251 ",
labelText: "Enter you phone number",
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(32))),
validator: (value) {
if (value!.length != 10)
return "Invalid phone number";
if (value!.length != 9) return "Invalid phone number";
return null;
},
),
Expand Down