문의 시 사용하시는 SDK 버전 정보와 플랫폼(Android / iOS) 및 디벨로퍼스 앱ID를 알려주세요.
kakao_flutter_sdk: 1.9.6
App ID: 1033371
카카오 버전: 11.1.3
Device: iPhone 15 pro
iOS: 18.0
위 환경에서 특정 계정으로 로그인 시도했을때 “authorizeWithTalk will call” 이후 authorizeWithTalk 호출 도중 크래시가 발생하여 다음 코드와 같이 로그를 확인하려 했지만 catch되지않고 크래시가 발생했습니다.
다른 디바이스 및 계정에서는 문제없이 로그인이 되고 있습니다.
Future<OAuthToken> loginWithKakaoTalk({
List<String>? channelPublicIds,
List<String>? serviceTerms,
String? nonce,
void Function(String)? callback,
}) async {
print('loginWithKakaoTalk called');
callback?.call('loginWithKakaoTalk called');
var codeVerifier = AuthCodeClient.codeVerifier();
print('codeVerifier: $codeVerifier');
callback?.call('codeVerifier: $codeVerifier');
String? stateToken;
String? redirectUrl;
if (kIsWeb) {
stateToken = generateRandomString(20);
redirectUrl = await AuthCodeClient.instance.platformRedirectUri();
}
callback?.call('authorizeWithTalk will call');
String authCode = '';
try {
authCode = await AuthCodeClient.instance.authorizeWithTalk(
redirectUri: redirectUrl ?? KakaoSdk.redirectUri,
channelPublicId: channelPublicIds,
serviceTerms: serviceTerms,
codeVerifier: codeVerifier,
nonce: nonce,
stateToken: stateToken,
webPopupLogin: true,
);
} catch (e) {
print('e: $e');
callback?.call('e: $e');
}
print('authCode: $authCode');
callback?.call('authCode: $authCode');
final token = await AuthApi.instance.issueAccessToken(
redirectUri: redirectUrl,
authCode: authCode,
codeVerifier: codeVerifier);
print('token: $token');
callback?.call('token: $token');
await TokenManagerProvider.instance.manager.setToken(token);
print('setToken called: $token');
callback?.call('setToken called: $token');
return token;
}