From 1bf97f44c17e93f26d53995da62691ff7150a871 Mon Sep 17 00:00:00 2001 From: boroboro01 Date: Sun, 29 Sep 2024 12:22:08 +0900 Subject: [PATCH] fix: fix error kakao login --- .vscode/c_cpp_properties.json | 18 ++ .vscode/launch.json | 13 ++ .vscode/settings.json | 59 ++++++ ios/Podfile.lock | 32 +++ lib/service/api_service.dart | 2 +- lib/service/auth_service.dart | 15 +- pubspec.lock | 188 ++++++++++++++++-- .../flutter/generated_plugin_registrant.cc | 3 + windows/flutter/generated_plugins.cmake | 1 + 9 files changed, 307 insertions(+), 24 deletions(-) create mode 100644 .vscode/c_cpp_properties.json create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..980fd57 --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,18 @@ +{ + "configurations": [ + { + "name": "macos-clang-arm64", + "includePath": [ + "${workspaceFolder}/**" + ], + "compilerPath": "/usr/bin/clang", + "cStandard": "${default}", + "cppStandard": "${default}", + "intelliSenseMode": "macos-clang-arm64", + "compilerArgs": [ + "" + ] + } + ], + "version": 4 +} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..6b51685 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,13 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "C/C++ Runner: Debug Session", + "type": "lldb", + "request": "launch", + "args": [], + "cwd": "/Users/boroboro01/development/App", + "program": "/Users/boroboro01/development/App/build/Debug/outDebug" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..b9c6ac8 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,59 @@ +{ + "C_Cpp_Runner.cCompilerPath": "clang", + "C_Cpp_Runner.cppCompilerPath": "clang++", + "C_Cpp_Runner.debuggerPath": "lldb", + "C_Cpp_Runner.cStandard": "", + "C_Cpp_Runner.cppStandard": "", + "C_Cpp_Runner.msvcBatchPath": "", + "C_Cpp_Runner.useMsvc": false, + "C_Cpp_Runner.warnings": [ + "-Wall", + "-Wextra", + "-Wpedantic", + "-Wshadow", + "-Wformat=2", + "-Wcast-align", + "-Wconversion", + "-Wsign-conversion", + "-Wnull-dereference" + ], + "C_Cpp_Runner.msvcWarnings": [ + "/W4", + "/permissive-", + "/w14242", + "/w14287", + "/w14296", + "/w14311", + "/w14826", + "/w44062", + "/w44242", + "/w14905", + "/w14906", + "/w14263", + "/w44265", + "/w14928" + ], + "C_Cpp_Runner.enableWarnings": true, + "C_Cpp_Runner.warningsAsError": false, + "C_Cpp_Runner.compilerArgs": [], + "C_Cpp_Runner.linkerArgs": [], + "C_Cpp_Runner.includePaths": [], + "C_Cpp_Runner.includeSearch": [ + "*", + "**/*" + ], + "C_Cpp_Runner.excludeSearch": [ + "**/build", + "**/build/**", + "**/.*", + "**/.*/**", + "**/.vscode", + "**/.vscode/**" + ], + "C_Cpp_Runner.useAddressSanitizer": false, + "C_Cpp_Runner.useUndefinedSanitizer": false, + "C_Cpp_Runner.useLeakSanitizer": false, + "C_Cpp_Runner.showCompilationTime": false, + "C_Cpp_Runner.useLinkTimeOptimization": false, + "C_Cpp_Runner.msvcSecureNoWarnings": false +} \ No newline at end of file diff --git a/ios/Podfile.lock b/ios/Podfile.lock index bae8c19..6c8d369 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -32,6 +32,13 @@ PODS: - FirebaseCoreInternal (10.29.0): - "GoogleUtilities/NSData+zlib (~> 7.8)" - Flutter (1.0.0) + - flutter_inappwebview_ios (0.0.1): + - Flutter + - flutter_inappwebview_ios/Core (= 0.0.1) + - OrderedSet (~> 6.0.3) + - flutter_inappwebview_ios/Core (0.0.1): + - Flutter + - OrderedSet (~> 6.0.3) - flutter_native_splash (0.0.1): - Flutter - flutter_secure_storage (6.0.0): @@ -78,6 +85,9 @@ PODS: - GTMSessionFetcher/Core - kakao_flutter_sdk_common (1.9.2): - Flutter + - OrderedSet (6.0.3) + - os_info_plugin (0.0.1): + - Flutter - path_provider_foundation (0.0.1): - Flutter - FlutterMacOS @@ -89,6 +99,10 @@ PODS: - sqflite (0.0.3): - Flutter - FlutterMacOS + - tosspayments_webview_flutter (0.0.1): + - Flutter + - url_launcher_ios (0.0.1): + - Flutter - webview_flutter_wkwebview (0.0.1): - Flutter @@ -96,13 +110,17 @@ DEPENDENCIES: - firebase_auth (from `.symlinks/plugins/firebase_auth/ios`) - firebase_core (from `.symlinks/plugins/firebase_core/ios`) - Flutter (from `Flutter`) + - flutter_inappwebview_ios (from `.symlinks/plugins/flutter_inappwebview_ios/ios`) - flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`) - flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`) - google_sign_in_ios (from `.symlinks/plugins/google_sign_in_ios/darwin`) - kakao_flutter_sdk_common (from `.symlinks/plugins/kakao_flutter_sdk_common/ios`) + - os_info_plugin (from `.symlinks/plugins/os_info_plugin/ios`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) - sqflite (from `.symlinks/plugins/sqflite/darwin`) + - tosspayments_webview_flutter (from `.symlinks/plugins/tosspayments_webview_flutter/ios`) + - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) - webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`) SPEC REPOS: @@ -117,6 +135,7 @@ SPEC REPOS: - GoogleUtilities - GTMAppAuth - GTMSessionFetcher + - OrderedSet - PromisesObjC - RecaptchaInterop @@ -127,6 +146,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/firebase_core/ios" Flutter: :path: Flutter + flutter_inappwebview_ios: + :path: ".symlinks/plugins/flutter_inappwebview_ios/ios" flutter_native_splash: :path: ".symlinks/plugins/flutter_native_splash/ios" flutter_secure_storage: @@ -135,12 +156,18 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/google_sign_in_ios/darwin" kakao_flutter_sdk_common: :path: ".symlinks/plugins/kakao_flutter_sdk_common/ios" + os_info_plugin: + :path: ".symlinks/plugins/os_info_plugin/ios" path_provider_foundation: :path: ".symlinks/plugins/path_provider_foundation/darwin" shared_preferences_foundation: :path: ".symlinks/plugins/shared_preferences_foundation/darwin" sqflite: :path: ".symlinks/plugins/sqflite/darwin" + tosspayments_webview_flutter: + :path: ".symlinks/plugins/tosspayments_webview_flutter/ios" + url_launcher_ios: + :path: ".symlinks/plugins/url_launcher_ios/ios" webview_flutter_wkwebview: :path: ".symlinks/plugins/webview_flutter_wkwebview/ios" @@ -154,6 +181,7 @@ SPEC CHECKSUMS: FirebaseCore: 2322423314d92f946219c8791674d2f3345b598f FirebaseCoreInternal: df84dd300b561c27d5571684f389bf60b0a5c934 Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 + flutter_inappwebview_ios: 6f63631e2c62a7c350263b13fa5427aedefe81d4 flutter_native_splash: edf599c81f74d093a4daf8e17bd7a018854bc778 flutter_secure_storage: d33dac7ae2ea08509be337e775f6b59f1ff45f12 google_sign_in_ios: 07375bfbf2620bc93a602c0e27160d6afc6ead38 @@ -162,11 +190,15 @@ SPEC CHECKSUMS: GTMAppAuth: f69bd07d68cd3b766125f7e072c45d7340dea0de GTMSessionFetcher: 5aea5ba6bd522a239e236100971f10cb71b96ab6 kakao_flutter_sdk_common: 049c9341e325da17ac75751a35646dbbcfa06891 + OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94 + os_info_plugin: d89ddf87e910a0d598fc4fc69d2b8f0f8239314f path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 RecaptchaInterop: 7d1a4a01a6b2cb1610a47ef3f85f0c411434cb21 shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695 sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec + tosspayments_webview_flutter: ceae304825a077de594d01ee39dd0ce2307adb4e + url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe webview_flutter_wkwebview: b7e70ef1ddded7e69c796c7390ee74180182971f PODFILE CHECKSUM: 7be2f5f74864d463a8ad433546ed1de7e0f29aef diff --git a/lib/service/api_service.dart b/lib/service/api_service.dart index 3b533a2..dd92a59 100644 --- a/lib/service/api_service.dart +++ b/lib/service/api_service.dart @@ -37,7 +37,7 @@ class APIService { final dio = Dio(BaseOptions( baseUrl: baseUrl, contentType: contentType ?? Headers.formUrlEncodedContentType, - headers: {HttpHeaders.authorizationHeader: 'Bearer $token'})); + headers: {HttpHeaders.authorizationHeader: '$token'})); dio.interceptors.add(logger); switch (method) { case DioMethod.post: diff --git a/lib/service/auth_service.dart b/lib/service/auth_service.dart index 9f511e2..bab35a9 100644 --- a/lib/service/auth_service.dart +++ b/lib/service/auth_service.dart @@ -13,27 +13,24 @@ Future loginService(String socialType, String email) async { ); final statusCode = response.data['status']['code']; - logger.i('Status code: $statusCode'); if (response.statusCode == 200) { logger.i('API call [loginService] successful: ${response.data}'); final authorization = response.headers['Authorization']; - final jwt = authorization?[0].replaceFirst('Bearer ', ''); + final jwt = 'Bearer ${authorization?[0]}'; await writeJwt(jwt); - logger.i('JWT : $jwt'); return statusCode; } else if (response.statusCode == 300) { logger.i( 'API call [loginService] successful, redirect register screen: ${response.data}'); return statusCode; } else { - logger.i('API call [loginService] failed: ${response.statusMessage}'); + logger.e('API call [loginService] failed: ${response.statusMessage}'); return statusCode; } } catch (e) { - logger.i('Network error occurred: $e'); + throw Exception(e); } - return null; } Future joinService( @@ -64,10 +61,10 @@ Future joinService( // logger.i('JWT : $jwt'); return statusCode; } else { - logger.i('API call [loginService] failed: ${response.statusMessage}'); + logger.e('API call [loginService] failed: ${response.statusMessage}'); + return statusCode; } } catch (e) { - logger.i('Network error occurred: $e'); + throw Exception(e); } - return null; } diff --git a/pubspec.lock b/pubspec.lock index 64b7fc2..9924b3d 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -113,6 +113,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.0" + carousel_slider: + dependency: "direct main" + description: + name: carousel_slider + sha256: "7b006ec356205054af5beaef62e2221160ea36b90fb70a35e4deacd49d0349ae" + url: "https://pub.dev" + source: hosted + version: "5.0.0" change_app_package_name: dependency: "direct main" description: @@ -318,6 +326,70 @@ packages: url: "https://pub.dev" source: hosted version: "5.1.0" + flutter_inappwebview: + dependency: transitive + description: + name: flutter_inappwebview + sha256: "9f023eaa11c91330344aca4c45cd537aba9ccd92ef74b41cd9e112a862530a4f" + url: "https://pub.dev" + source: hosted + version: "6.1.2" + flutter_inappwebview_android: + dependency: transitive + description: + name: flutter_inappwebview_android + sha256: "6b24fbbaa69168da2d2ab4ddb2d65677468e2a0a0d593d629558537f710786dc" + url: "https://pub.dev" + source: hosted + version: "1.1.0+4" + flutter_inappwebview_internal_annotations: + dependency: transitive + description: + name: flutter_inappwebview_internal_annotations + sha256: "5f80fd30e208ddded7dbbcd0d569e7995f9f63d45ea3f548d8dd4c0b473fb4c8" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + flutter_inappwebview_ios: + dependency: transitive + description: + name: flutter_inappwebview_ios + sha256: "571b0bfdb963548fcb945b9abe357352b4a523c249b4f9816fc5a83e2a71d9ec" + url: "https://pub.dev" + source: hosted + version: "1.1.0+3" + flutter_inappwebview_macos: + dependency: transitive + description: + name: flutter_inappwebview_macos + sha256: e5e7f09dabd7b5b2ef15b00c07ed4da4a45bd597db0c4221702485665b6628b7 + url: "https://pub.dev" + source: hosted + version: "1.1.0+3" + flutter_inappwebview_platform_interface: + dependency: transitive + description: + name: flutter_inappwebview_platform_interface + sha256: da6c7bf193beba655bdfcd825b6c7f7b51da4944e1eb76bf9faddf685ca15fa2 + url: "https://pub.dev" + source: hosted + version: "1.1.1" + flutter_inappwebview_web: + dependency: transitive + description: + name: flutter_inappwebview_web + sha256: ee1389bfec8c9ef07ba4be48a117207c9392dbdbf366330aa26d69f67a826978 + url: "https://pub.dev" + source: hosted + version: "1.1.0+2" + flutter_inappwebview_windows: + dependency: transitive + description: + name: flutter_inappwebview_windows + sha256: "3ad92e93bafc2984f90f627783c3f5fc705842fb8d4f7213f92bb9027c6eac94" + url: "https://pub.dev" + source: hosted + version: "0.3.0+1" flutter_lints: dependency: "direct dev" description: @@ -572,18 +644,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" url: "https://pub.dev" source: hosted - version: "10.0.4" + version: "10.0.5" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.5" leak_tracker_testing: dependency: transitive description: @@ -628,18 +700,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.12.0" + version: "1.15.0" octo_image: dependency: transitive description: @@ -648,6 +720,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.0" + os_info_plugin: + dependency: transitive + description: + name: os_info_plugin + sha256: "381a8ba0a6ab663565a63e40d2eb859e227b022fd458b4ea01cb32459286285f" + url: "https://pub.dev" + source: hosted + version: "0.0.1" package_config: dependency: transitive description: @@ -961,10 +1041,10 @@ packages: dependency: transitive description: name: test_api - sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.7.0" + version: "0.7.2" toggle_list: dependency: "direct main" description: @@ -973,6 +1053,22 @@ packages: url: "https://pub.dev" source: hosted version: "0.3.1" + tosspayments_webview_flutter: + dependency: transitive + description: + name: tosspayments_webview_flutter + sha256: b2c61c5275dda9128f05fe13af9b642087ecb71f4ddece454f0b3dbb7e3c76c6 + url: "https://pub.dev" + source: hosted + version: "1.0.4" + tosspayments_widget_sdk_flutter: + dependency: "direct main" + description: + name: tosspayments_widget_sdk_flutter + sha256: c8bc1f2db6c7f1eabc40114b21fc6662a7e089bda666e47531fd2b6dee440ad4 + url: "https://pub.dev" + source: hosted + version: "2.0.6" typed_data: dependency: transitive description: @@ -989,6 +1085,70 @@ packages: url: "https://pub.dev" source: hosted version: "2.2.2" + url_launcher: + dependency: transitive + description: + name: url_launcher + sha256: "21b704ce5fa560ea9f3b525b43601c678728ba46725bab9b01187b4831377ed3" + url: "https://pub.dev" + source: hosted + version: "6.3.0" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + sha256: e35a698ac302dd68e41f73250bd9517fe3ab5fa4f18fe4647a0872db61bacbab + url: "https://pub.dev" + source: hosted + version: "6.3.10" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + sha256: e43b677296fadce447e987a2f519dcf5f6d1e527dc35d01ffab4fff5b8a7063e + url: "https://pub.dev" + source: hosted + version: "6.3.1" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + sha256: e2b9622b4007f97f504cd64c0128309dfb978ae66adbe944125ed9e1750f06af + url: "https://pub.dev" + source: hosted + version: "3.2.0" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + sha256: "769549c999acdb42b8bcfa7c43d72bf79a382ca7441ab18a808e101149daf672" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" + url: "https://pub.dev" + source: hosted + version: "2.3.3" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + sha256: "49c10f879746271804767cb45551ec5592cdab00ee105c06dddde1a98f73b185" + url: "https://pub.dev" + source: hosted + version: "3.1.2" uuid: dependency: transitive description: @@ -1033,10 +1193,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc url: "https://pub.dev" source: hosted - version: "14.2.1" + version: "14.2.4" watcher: dependency: transitive description: @@ -1118,5 +1278,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.4.0 <4.0.0" - flutter: ">=3.22.0" + dart: ">=3.5.0 <4.0.0" + flutter: ">=3.24.0" diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index 90ddfc3..b333ccb 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -8,6 +8,7 @@ #include #include +#include #include #include @@ -16,6 +17,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) { registry->GetRegistrarForPlugin("FirebaseAuthPluginCApi")); FirebaseCorePluginCApiRegisterWithRegistrar( registry->GetRegistrarForPlugin("FirebaseCorePluginCApi")); + FlutterInappwebviewWindowsPluginCApiRegisterWithRegistrar( + registry->GetRegistrarForPlugin("FlutterInappwebviewWindowsPluginCApi")); FlutterSecureStorageWindowsPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin")); UrlLauncherWindowsRegisterWithRegistrar( diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index 2a65ab6..0e1bc02 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -5,6 +5,7 @@ list(APPEND FLUTTER_PLUGIN_LIST firebase_auth firebase_core + flutter_inappwebview_windows flutter_secure_storage_windows url_launcher_windows )