카카오 로그인 관련 올퓨

문의 시 사용하시는 SDK 버전 정보와 플랫폼(Android / iOS) 및 디벨로퍼스 앱ID를 알려주세요.


디벨로퍼스 앱 ID = 463048

Android = io.everyportable
iOS = kr.co.everyportable.FullChargeApp

플러터 kakao_flutter_sdk_user: ^1.9.7+3 패키지는 다음과 같습니다.

카카오톡 앱이 설치가 되어 있지 않은 경우에는 카카오 계정으로 로그인(loginWithKakaoAccount)을 통해 잘 로그인이 됩니다.
하지만 카카오톡 앱이 설치가 되어있는 경우에는 ‘카카오톡으로 로그인 시도’ 라는 로그는 출력되나,
loginWithKakaoTalk 이후 token은 출력되지 않습니다

Future<void> startKakaoLogin() async {
    // await UserApi.instance.logout();
    // dlog.d('카카오 로그아웃 성공');
    OAuthToken token;

    if (await isKakaoTalkInstalled()) {
      try {
        dlog.d('카카오톡으로 로그인 시도');
        await UserApi.instance.logout(); 
        final token = await UserApi.instance.loginWithKakaoTalk();
        print('✅ loginWithKakaoTalk finished, token: $token');
        dlog.d('token : $token');
        dlog.d('카카오톡으로 로그인 성공');
        await _handleKakaoLogin(token);
      } catch (error) {
        dlog.d('1. 카카오톡으로 로그인 실패 $error');
        if (error is PlatformException && error.code == 'CANCELED') return;
        // 카카오톡에 연결된 카카오계정이 없는 경우, 카카오계정으로 로그인
        try {
          token = await UserApi.instance.loginWithKakaoAccount(
            prompts: [Prompt.selectAccount],
            //scopes: ['openid','email','profile'],
          );
          dlog.d('카카오계정으로 로그인 성공');
          await _handleKakaoLogin(token);
        } catch (error) {
          dlog.d('2. 카카오계정으로 로그인 실패 $error');
          _handleKakaoLoginError(error);
        }
      }
    } else {
      try {
        dlog.d('카카오계정으로 로그인 시도');
        final token = await UserApi.instance
            .loginWithKakaoAccount(prompts: [Prompt.selectAccount]);
        dlog.d('카카오계정으로 로그인 성공');
        await _handleKakaoLogin(token);
      } catch (error) {
        dlog.d('카카오계정으로 로그인 실패 $error');
        _handleKakaoLoginError(error);
      }
    }
  }

아래 AppDelegate.swift 를 통해 카카오톡 앱을 갔다가 다시 앱으로 돌아오는 신호를 콜백으로 넘기고 있습니다.

import UIKit
import Flutter
import NidThirdPartyLogin
import KakaoSDKCommon
import KakaoSDKAuth

@main
@objc class AppDelegate: FlutterAppDelegate {
  override func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  ) -> Bool {

    // ✅ 1. Kakao SDK 초기화 (플러그인보다 먼저!)
    KakaoSDK.initSDK(appKey: "cf7156a1992ef075c437760e6aa49111")

    // ✅ 2. GeneratedPluginRegistrant 호출 (Flutter Engine 연결)
    GeneratedPluginRegistrant.register(with: self)

    return super.application(application, didFinishLaunchingWithOptions: launchOptions)
  }

  override func application(
    _ app: UIApplication,
    open url: URL,
    options: [UIApplication.OpenURLOptionsKey: Any] = [:]
  ) -> Bool {

    print("🔗 [AppDelegate] open url: \(url.absoluteString)")

    if NidOAuth.shared.handleURL(url) {
      print("✅ [AppDelegate] handled by Naver")
      return true
    }

    if AuthApi.isKakaoTalkLoginUrl(url) {
      print("✅ [AppDelegate] handled by Kakao (Talk)")
      _ = AuthController.handleOpenUrl(url: url)
      return true
    }

    return super.application(app, open: url, options: options)
  }
}


Xcode 에서는 다음과 같이 TokenNotFound 라고 오류가 뜹니다.

🔗 [AppDelegate] open url: kakaocf7156a1992ef075c437760e6aa49111://oauth?code=-Tbn0EfUZqAIIDbCDGX5zA5j2lwL8a5ySwp3TRL5qD7lNnGuOp_iLQAAAAQKFwtrAAABmlNcYVHdCc_9be4aqQ
✅ [AppDelegate] handled by Kakao (Talk)
2025-11-05 18:32:34573 [💬][MigrateManager.swift 23:17] -> ============================================================================================================
2025-11-05 18:32:34574 [💬][MigrateManager.swift 24:17] -> check migration... 
2025-11-05 18:32:34574 [💬][MigrateManager.swift 26:21] ->  pass migration... 
2025-11-05 18:32:34574 [💬][MigrateManager.swift 27:21] ->  used sdk version:2.22.7
2025-11-05 18:32:34591 [💬][AuthApiCommon.swift 49:17] -> >>>> [KakaoSDKCommon.SessionType.Api: Alamofire.Session, KakaoSDKCommon.SessionType.RxAuthApi: Alamofire.Session, KakaoSDKCommon.SessionType.Auth: Alamofire.Session, KakaoSDKCommon.SessionType.AuthApi: Alamofire.Session]
12.2.0 - [FirebaseAnalytics][I-ACS023001] Deep Link does not contain valid required params. URL params: {
    code = "-Tbn0EfUZqAIIDbCDGX5zA5j2lwL8a5ySwp3TRL5qD7lNnGuOp_iLQAAAAQKFwtrAAABmlNcYVHdCc_9be4aqQ";
}
App Did Become Active
[AppsFlyer Exception Client] [EXM] Flush called not on didEnterBackground. Exceptions will not be sent
[com.appsflyer.serial] Start
[com.appsflyer.serial] [CLS] ASIdentifierManager not found
[com.appsflyer.serial] [CLS] ADClient not found
[com.appsflyer.serial] [CLS] FBSDKAppEventsUtility not found
[com.appsflyer.serial] [START] isFirstLaunch: No, timestamp: 1762229104.577309
[com.appsflyer.serial] [START] Time from last start(session): 16.978711
[com.appsflyer.serial] Looking for previous version date
[com.appsflyer.serial] Current cached application version: 3.0.3, new version: 3.0.3
[com.appsflyer.serial] Use date3 from storage
[com.appsflyer.serial] date1: 2025-11-04_130445+0900
[com.appsflyer.serial] date2: 2025-11-05_183217+0900
[com.appsflyer.serial] date3: 2025-11-05_145507+0900
[com.appsflyer.serial] First launch date: 2025-11-04_130504+0900
[com.appsflyer.serial] iAD: iSearchAdsDict is nil
[com.appsflyer.serial] [SKAd] Times out. sk_exp = 1762315507.668052
[com.appsflyer.serial] [HTTP] Operation start: `Config-1`
[com.appsflyer.serial] [CFG] No update needed
[afsdk-buffer-serial] [HTTP] Dealloc. Time elapsed for: `Config-1` - 0.0002110004425048828
[com.appsflyer.serial] [HTTP] Operation start: `SKAD-s2s-launch`
[afsdk-buffer-serial] [HTTP] Dealloc. Time elapsed for: `SKAD-s2s-launch` - 7.104873657226562e-05
2025-11-05 18:32:35051 [‼️][AuthRequestRetrier.swift 40:25] -> request retrier:
 error:requestAdaptationFailed(error: KakaoSDKCommon.SdkError.ClientFailed(reason: KakaoSDKCommon.ClientFailureReason.TokenNotFound, errorMessage: Optional("authentication tokens not exist.")))
 not api error -> pass through


2025-11-05 18:32:35052 [‼️][AuthRequestRetrier.swift 119:21] -> request retrier:
 not handled error -> pass through 


2025-11-05 18:32:35053 [‼️][Api.swift 151:29] -> response:
 api error: ClientFailed(reason: KakaoSDKCommon.ClientFailureReason.TokenNotFound, errorMessage: Optional("authentication tokens not exist."))

키 값들도 다 제대로 작성하고 Info.plist 에서도 카카오 관련키를 작성해주고 있습니다.

카카오계정으로 로그인은 되나 카카오톡으로 로그인이 정상적인 작동을 하지 않아 문의드립니다.

해당 코드 제거 후, 다시 시도해 보시겠어요?

해당 코드 삭제후 진행해도 카카오톡앱 로그인을 시도하면 아무런 로그가 찍히지 않습니다.

카카오톡앱으로 갔다가 다시 앱으로 들어오긴 합니다.

회원님 프로젝트에 flutter SDK와 iOS SDK가 함께 설치되어 있습니다.
xocde에서 iOS SDK 패키지 제거 부탁드립니다.