Skip to content
Merged
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
2 changes: 2 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ close #
## 💬리뷰 요구사항



## 다음 작업 계획

2 changes: 1 addition & 1 deletion android/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ plugins {
id("com.android.application")
id("kotlin-android")
id("com.google.gms.google-services")
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id("dev.flutter.flutter-gradle-plugin")
}

Expand Down Expand Up @@ -53,3 +52,4 @@ android {
flutter {
source = "../.."
}

11 changes: 11 additions & 0 deletions android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,14 @@ subprojects {
tasks.register<Delete>("clean") {
delete(rootProject.layout.buildDirectory)
}

buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.google.gms:google-services:4.3.15") // ✅ 괄호 주의
}
}

1 change: 1 addition & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"flutter":{"platforms":{"android":{"default":{"projectId":"code-l-b109b","appId":"1:971644319685:android:34198e5a313e5294b53dac","fileOutput":"android/app/google-services.json"}},"ios":{"default":{"projectId":"code-l-b109b","appId":"1:971644319685:ios:bde2639222525193b53dac","uploadDebugSymbols":false,"fileOutput":"ios/Runner/GoogleService-Info.plist"}},"dart":{"lib/firebase_options.dart":{"projectId":"code-l-b109b","configurations":{"android":"1:971644319685:android:34198e5a313e5294b53dac","ios":"1:971644319685:ios:bde2639222525193b53dac"}}}}}}
130 changes: 130 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
PODS:
- Firebase/Auth (11.10.0):
- Firebase/CoreOnly
- FirebaseAuth (~> 11.10.0)
- Firebase/CoreOnly (11.10.0):
- FirebaseCore (~> 11.10.0)
- firebase_auth (5.5.2):
- Firebase/Auth (= 11.10.0)
- firebase_core
- Flutter
- firebase_core (3.13.0):
- Firebase/CoreOnly (= 11.10.0)
- Flutter
- FirebaseAppCheckInterop (11.11.0)
- FirebaseAuth (11.10.0):
- FirebaseAppCheckInterop (~> 11.0)
- FirebaseAuthInterop (~> 11.0)
- FirebaseCore (~> 11.10.0)
- FirebaseCoreExtension (~> 11.10.0)
- GoogleUtilities/AppDelegateSwizzler (~> 8.0)
- GoogleUtilities/Environment (~> 8.0)
- GTMSessionFetcher/Core (< 5.0, >= 3.4)
- RecaptchaInterop (~> 101.0)
- FirebaseAuthInterop (11.11.0)
- FirebaseCore (11.10.0):
- FirebaseCoreInternal (~> 11.10.0)
- GoogleUtilities/Environment (~> 8.0)
- GoogleUtilities/Logger (~> 8.0)
- FirebaseCoreExtension (11.10.0):
- FirebaseCore (~> 11.10.0)
- FirebaseCoreInternal (11.10.0):
- "GoogleUtilities/NSData+zlib (~> 8.0)"
- Flutter (1.0.0)
- fluttertoast (0.0.2):
- Flutter
- GoogleUtilities/AppDelegateSwizzler (8.0.2):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- GoogleUtilities/Privacy
- GoogleUtilities/Environment (8.0.2):
- GoogleUtilities/Privacy
- GoogleUtilities/Logger (8.0.2):
- GoogleUtilities/Environment
- GoogleUtilities/Privacy
- GoogleUtilities/Network (8.0.2):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Privacy
- GoogleUtilities/Reachability
- "GoogleUtilities/NSData+zlib (8.0.2)":
- GoogleUtilities/Privacy
- GoogleUtilities/Privacy (8.0.2)
- GoogleUtilities/Reachability (8.0.2):
- GoogleUtilities/Logger
- GoogleUtilities/Privacy
- GTMSessionFetcher/Core (4.4.0)
- kakao_flutter_sdk_common (1.9.7-3):
- Flutter
- RecaptchaInterop (101.0.0)
- screen_protector (1.2.1):
- Flutter
- ScreenProtectorKit (~> 1.3.1)
- ScreenProtectorKit (1.3.1)
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS

DEPENDENCIES:
- firebase_auth (from `.symlinks/plugins/firebase_auth/ios`)
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
- Flutter (from `Flutter`)
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
- kakao_flutter_sdk_common (from `.symlinks/plugins/kakao_flutter_sdk_common/ios`)
- screen_protector (from `.symlinks/plugins/screen_protector/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)

SPEC REPOS:
trunk:
- Firebase
- FirebaseAppCheckInterop
- FirebaseAuth
- FirebaseAuthInterop
- FirebaseCore
- FirebaseCoreExtension
- FirebaseCoreInternal
- GoogleUtilities
- GTMSessionFetcher
- RecaptchaInterop
- ScreenProtectorKit

EXTERNAL SOURCES:
firebase_auth:
:path: ".symlinks/plugins/firebase_auth/ios"
firebase_core:
:path: ".symlinks/plugins/firebase_core/ios"
Flutter:
:path: Flutter
fluttertoast:
:path: ".symlinks/plugins/fluttertoast/ios"
kakao_flutter_sdk_common:
:path: ".symlinks/plugins/kakao_flutter_sdk_common/ios"
screen_protector:
:path: ".symlinks/plugins/screen_protector/ios"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"

SPEC CHECKSUMS:
Firebase: 1fe1c0a7d9aaea32efe01fbea5f0ebd8d70e53a2
firebase_auth: e37065f3f80ff90580c13ad0e5a48e3bb8d2ad77
firebase_core: 432718558359a8c08762151b5f49bb0f093eb6e0
FirebaseAppCheckInterop: f23709c9ce92d810aa53ff4ce12ad3e666a3c7be
FirebaseAuth: c4146bdfdc87329f9962babd24dae89373f49a32
FirebaseAuthInterop: ac22ed402c2f4e3a8c63ebd3278af9a06073c1be
FirebaseCore: 8344daef5e2661eb004b177488d6f9f0f24251b7
FirebaseCoreExtension: 6f357679327f3614e995dc7cf3f2d600bdc774ac
FirebaseCoreInternal: ef4505d2afb1d0ebbc33162cb3795382904b5679
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
fluttertoast: 21eecd6935e7064cc1fcb733a4c5a428f3f24f0f
GoogleUtilities: 26a3abef001b6533cf678d3eb38fd3f614b7872d
GTMSessionFetcher: 75b671f9e551e4c49153d4c4f8659ef4f559b970
kakao_flutter_sdk_common: 3dc8492c202af7853585d151490b1c5c6b7576cb
RecaptchaInterop: 11e0b637842dfb48308d242afc3f448062325aba
screen_protector: 6f92086bd2f2f4b54f54913289b9d1310610140b
ScreenProtectorKit: 83a6281b02c7a5902ee6eac4f5045f674e902ae4
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78

PODFILE CHECKSUM: f8c2dcdfb50bb67645580d28a6bf814fca30bdec

COCOAPODS: 1.16.2
3 changes: 3 additions & 0 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
A0C3D7BA37E297BF670F5764 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = "<group>"; };
AFD21D852DB512DE00452D52 /* RunnerDebug.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RunnerDebug.entitlements; sourceTree = "<group>"; };
AFE368912DBBC8390072E7EF /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; };
B955AE8AC425CE69815F5900 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
C7F447F3DE684CF75971C579 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -147,6 +148,7 @@
97C146F01CF9000F007C117D /* Runner */ = {
isa = PBXGroup;
children = (
AFD21D852DB512DE00452D52 /* RunnerDebug.entitlements */,
E1FBF0C22DBBDA7A0017C51F /* Runner.entitlements */,
AFE368912DBBC8390072E7EF /* Runner.entitlements */,
E1FBF0C02DAE7C460017C51F /* GoogleService-Info.plist */,
Expand Down Expand Up @@ -666,6 +668,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_ENTITLEMENTS = Runner/RunnerDebug.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
Expand Down
36 changes: 36 additions & 0 deletions ios/Runner/GoogleService-Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CLIENT_ID</key>
<string>971644319685-jo8kiqh779jhevlh53d3cbj3lrdavovf.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.971644319685-jo8kiqh779jhevlh53d3cbj3lrdavovf</string>
<key>ANDROID_CLIENT_ID</key>
<string>971644319685-vnlopiq93h2n0cukes3chrm8n51t2836.apps.googleusercontent.com</string>
<key>API_KEY</key>
<string>AIzaSyA6aPcY0Qv4eCO4Q_KLxF0KMDQ9M9wdZlw</string>
<key>GCM_SENDER_ID</key>
<string>971644319685</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.codel.codel</string>
<key>PROJECT_ID</key>
<string>code-l-b109b</string>
<key>STORAGE_BUCKET</key>
<string>code-l-b109b.firebasestorage.app</string>
<key>IS_ADS_ENABLED</key>
<false></false>
<key>IS_ANALYTICS_ENABLED</key>
<false></false>
<key>IS_APPINVITE_ENABLED</key>
<true></true>
<key>IS_GCM_ENABLED</key>
<true></true>
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:971644319685:ios:bde2639222525193b53dac</string>
</dict>
</plist>
48 changes: 35 additions & 13 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>kakaoe17acdc68adf7250d61dd15f8ee185c1</string>
</array>
</dict>
</array>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
Expand All @@ -29,10 +22,43 @@
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>kakaoe17acdc68adf7250d61dd15f8ee185c1</string>
<string>app-1-971644319685-ios-bde2639222525193b53dac</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>com.googleusercontent.apps.971644319685-jo8kiqh779jhevlh53d3cbj3lrdavovf</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>app-1-971644319685-ios-bde2639222525193b53dac
</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UIBackgroundModes</key>
<array>
<string>remote-notification</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
Expand All @@ -50,9 +76,5 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>
8 changes: 8 additions & 0 deletions ios/Runner/RunnerDebug.entitlements
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
</dict>
</plist>
47 changes: 47 additions & 0 deletions lib/auth/data/repositories/default_phone_number_repository.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import 'dart:developer';

import 'package:firebase_auth/firebase_auth.dart';

import '../../domain/repositories/phone_number_repository.dart';

class DefaultPhoneNumberRepository implements PhoneNumberRepository {
final FirebaseAuth _auth = FirebaseAuth.instance;

@override
Future<void> verifyPhoneNumber(
String phoneNumber, Function(String) onCodeSent) async {
await _auth.verifyPhoneNumber(
phoneNumber: phoneNumber,
timeout: const Duration(seconds: 120),
verificationCompleted: (PhoneAuthCredential credential) async {
log(name: 'DefaultPhoneNumberRepository : verifyPhoneNumber', '핸드폰 자동 인증 완료');
await _auth.signInWithCredential(credential);
},
verificationFailed: (FirebaseAuthException e) {
log(name: 'DefaultPhoneNumberRepository : verifyPhoneNumber', '인증 번호 실패: ${e.message}');
},
codeSent: (String verificationId, int? forceResendingToken) async {
log(name: 'DefaultPhoneNumberRepository : verifyPhoneNumber', '인증 번호 전송');
onCodeSent(verificationId);
},
codeAutoRetrievalTimeout: (String verificationId) {
log(name: 'DefaultPhoneNumberRepository : verifyPhoneNumber', "인증 번호 시간 초과");
},
);
}

@override
Future<void> signInWithSmsCode(String verificationId, String smsCode) async {
try {
final credential = PhoneAuthProvider.credential(
verificationId: verificationId,
smsCode: smsCode,
);
await _auth.signInWithCredential(credential);
log(name: 'DefaultPhoneNumberRepository : signInWithSmsCode', '로그인 성공');
} on FirebaseAuthException catch (e) {
log(name: 'DefaultPhoneNumberRepository : signInWithSmsCode', '로그인 실패: ${e.code} - ${e.message}');
rethrow;
}
}
}
24 changes: 24 additions & 0 deletions lib/auth/domain/model/identity/phone_number.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

class PhoneNumber {
final String value;

PhoneNumber._(this.value);

factory PhoneNumber.fromLocal(String local) {
if (!local.startsWith('0')) {
throw FormatException("로컬 번호는 0으로 시작해야 합니다");
}
final formatted = "+82${local.substring(1)}";
return PhoneNumber._(formatted);
}

factory PhoneNumber.fromInternational(String international) {
if (!international.startsWith('+82')) {
throw FormatException("국제번호 형식이 아닙니다");
}
return PhoneNumber._(international);
}

@override
String toString() => value;
Comment on lines +2 to +23
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

좋습니다 !!👍👍👍👍

}
Empty file.
5 changes: 5 additions & 0 deletions lib/auth/domain/repositories/phone_number_repository.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
abstract class PhoneNumberRepository {
Future<void> verifyPhoneNumber(
String phoneNumber, Function(String) onCodeSent);
Future<void> signInWithSmsCode(String verificationId, String smsCode);
}
Empty file removed lib/auth/domain/usecases/.gitkeep
Empty file.
Loading