Skip to content

Commit a269d18

Browse files
author
PeterHdd
committed
feat: phone auth
1 parent f3b8aea commit a269d18

File tree

82 files changed

+2526
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+2526
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
12+
# IntelliJ related
13+
*.iml
14+
*.ipr
15+
*.iws
16+
.idea/
17+
18+
# The .vscode folder contains launch configuration and tasks you configure in
19+
# VS Code which you may wish to be included in version control, so this line
20+
# is commented out by default.
21+
#.vscode/
22+
23+
# Flutter/Dart/Pub related
24+
**/doc/api/
25+
**/ios/Flutter/.last_build_id
26+
.dart_tool/
27+
.flutter-plugins
28+
.flutter-plugins-dependencies
29+
.packages
30+
.pub-cache/
31+
.pub/
32+
/build/
33+
34+
# Web related
35+
lib/generated_plugin_registrant.dart
36+
37+
# Symbolication related
38+
app.*.symbols
39+
40+
# Obfuscation related
41+
app.*.map.json
42+
43+
# Android Studio will place build artifacts here
44+
/android/app/debug
45+
/android/app/profile
46+
/android/app/release
47+
48+
49+
google-services.json
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled and should not be manually edited.
5+
6+
version:
7+
revision: 60bd88df915880d23877bfc1602e8ddcf4c4dd2a
8+
channel: stable
9+
10+
project_type: app
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
Source code For Phone Facebook Auth Tutorial
3+
4+
https://petercoding.com/firebase/2021/06/27/using-phone-authentication-with-firebase-in-flutter/
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
gradle-wrapper.jar
2+
/.gradle
3+
/captures/
4+
/gradlew
5+
/gradlew.bat
6+
/local.properties
7+
GeneratedPluginRegistrant.java
8+
9+
# Remember to never publicly share your keystore.
10+
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11+
key.properties
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
def localProperties = new Properties()
2+
def localPropertiesFile = rootProject.file('local.properties')
3+
if (localPropertiesFile.exists()) {
4+
localPropertiesFile.withReader('UTF-8') { reader ->
5+
localProperties.load(reader)
6+
}
7+
}
8+
9+
def flutterRoot = localProperties.getProperty('flutter.sdk')
10+
if (flutterRoot == null) {
11+
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12+
}
13+
14+
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15+
if (flutterVersionCode == null) {
16+
flutterVersionCode = '1'
17+
}
18+
19+
def flutterVersionName = localProperties.getProperty('flutter.versionName')
20+
if (flutterVersionName == null) {
21+
flutterVersionName = '1.0'
22+
}
23+
24+
apply plugin: 'com.android.application'
25+
apply plugin: 'kotlin-android'
26+
apply plugin: 'com.google.gms.google-services'
27+
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
28+
29+
android {
30+
compileSdkVersion 30
31+
32+
sourceSets {
33+
main.java.srcDirs += 'src/main/kotlin'
34+
}
35+
36+
defaultConfig {
37+
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
38+
applicationId "com.example.firebase_phone_auth_tutorial"
39+
minSdkVersion 23
40+
targetSdkVersion 30
41+
versionCode flutterVersionCode.toInteger()
42+
versionName flutterVersionName
43+
}
44+
45+
buildTypes {
46+
release {
47+
// TODO: Add your own signing config for the release build.
48+
// Signing with the debug keys for now, so `flutter run --release` works.
49+
signingConfig signingConfigs.debug
50+
}
51+
}
52+
}
53+
54+
flutter {
55+
source '../..'
56+
}
57+
58+
dependencies {
59+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
60+
implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'
61+
62+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="com.example.firebase_phone_auth_tutorial">
3+
<!-- Flutter needs it to communicate with the running application
4+
to allow setting breakpoints, to provide hot reload, etc.
5+
-->
6+
<uses-permission android:name="android.permission.INTERNET"/>
7+
</manifest>
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="com.example.firebase_phone_auth_tutorial">
3+
<uses-permission android:name="android.permission.INTERNET"/>
4+
<application
5+
android:label="firebase_phone_auth_tutorial"
6+
android:icon="@mipmap/ic_launcher">
7+
<meta-data android:name="com.facebook.sdk.ApplicationId"
8+
android:value="@string/facebook_app_id"/>
9+
10+
<activity android:name="com.facebook.FacebookActivity"
11+
android:configChanges=
12+
"keyboard|keyboardHidden|screenLayout|screenSize|orientation"
13+
android:label="@string/app_name" />
14+
<activity
15+
android:name="com.facebook.CustomTabActivity"
16+
android:exported="true">
17+
<intent-filter>
18+
<action android:name="android.intent.action.VIEW" />
19+
<category android:name="android.intent.category.DEFAULT" />
20+
<category android:name="android.intent.category.BROWSABLE" />
21+
<data android:scheme="@string/fb_login_protocol_scheme" />
22+
</intent-filter>
23+
</activity>
24+
25+
<activity
26+
android:name=".MainActivity"
27+
android:launchMode="singleTop"
28+
android:theme="@style/LaunchTheme"
29+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
30+
android:hardwareAccelerated="true"
31+
android:windowSoftInputMode="adjustResize">
32+
<!-- Specifies an Android theme to apply to this Activity as soon as
33+
the Android process has started. This theme is visible to the user
34+
while the Flutter UI initializes. After that, this theme continues
35+
to determine the Window background behind the Flutter UI. -->
36+
<meta-data
37+
android:name="io.flutter.embedding.android.NormalTheme"
38+
android:resource="@style/NormalTheme"
39+
/>
40+
<!-- Displays an Android View that continues showing the launch screen
41+
Drawable until Flutter paints its first frame, then this splash
42+
screen fades out. A splash screen is useful to avoid any visual
43+
gap between the end of Android's launch screen and the painting of
44+
Flutter's first frame. -->
45+
<meta-data
46+
android:name="io.flutter.embedding.android.SplashScreenDrawable"
47+
android:resource="@drawable/launch_background"
48+
/>
49+
<intent-filter>
50+
<action android:name="android.intent.action.MAIN"/>
51+
<category android:name="android.intent.category.LAUNCHER"/>
52+
</intent-filter>
53+
</activity>
54+
<!-- Don't delete the meta-data below.
55+
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
56+
<meta-data
57+
android:name="flutterEmbedding"
58+
android:value="2" />
59+
</application>
60+
</manifest>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package com.example.firebase_phone_auth_tutorial
2+
3+
import io.flutter.embedding.android.FlutterActivity
4+
5+
class MainActivity: FlutterActivity() {
6+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Modify this file to customize your launch splash screen -->
3+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
4+
<item android:drawable="?android:colorBackground" />
5+
6+
<!-- You can insert your own image assets here -->
7+
<!-- <item>
8+
<bitmap
9+
android:gravity="center"
10+
android:src="@mipmap/launch_image" />
11+
</item> -->
12+
</layer-list>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Modify this file to customize your launch splash screen -->
3+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
4+
<item android:drawable="@android:color/white" />
5+
6+
<!-- You can insert your own image assets here -->
7+
<!-- <item>
8+
<bitmap
9+
android:gravity="center"
10+
android:src="@mipmap/launch_image" />
11+
</item> -->
12+
</layer-list>

0 commit comments

Comments
 (0)