loginWithKakaoAccount() 미응답 이슈

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


flutter: 3.7.12
[kakao-flutter]
kakao_flutter_sdk_user 1.4.2
│ └── kakao_flutter_sdk_auth 1.4.2
│ ├── kakao_flutter_sdk_common 1.4.2

platform: web
app id: 897607

[문의 내용]
loginWithKakaoAccount() 호출 시 응답이 오지 않습니다. 에러도 발생하지 않습니다.

카카오측에도 에러가 없네요.

아래 공식 예제 정상작동하는지 확인해주세요.

Flutter 카카오 SDK 사용, 공식 예제 실행해보기

1개의 좋아요

안녕하세요!

가이드 주셔서 감사합니다.

해당 레포를 클론받아 vscode를 통해서 크롬으로 실행 후 loginWithKakaoAccount() 호출하였는데요. 로그인 시도하는 경우 아래와 같은 에러가 발생합니다. 혹시 연관이 있을까요?!

[log] [:microscope:] *** DioException ***:
[log] [:microscope:] uri: https://kauth.kakao.com/oauth/token
[log] [:microscope:] DioException [bad response]: This exception was thrown because the response has a status code of 401 and RequestOptions.validateStatus was configured to throw for this status code.
The status code of 401 has the following meaning: “Client error - the request contains bad syntax or cannot be fulfilled”
Read more about status codes at https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
In order to resolve this exception you typically have either to verify and fix your request code or you have to fix the server code.
[log] [:microscope:] uri: https://kauth.kakao.com/oauth/token
[log] [:microscope:] statusCode: 401
[log] [:microscope:] headers:
[log] [:microscope:] cache-control: no-store
[log] [:microscope:] content-type: application/json;charset=utf-8
[log] [:microscope:] pragma: no-cache
[log] [:microscope:] Response Text:
[log] [:microscope:] {“error”:“misconfigured”,“error_description”:“invalid android_key_hash or ios_bundle_id or web_site_url”,“error_code”:“KOE009”}
2
[log] [:microscope:]
[KakaoSdkSample] 로그인 실패
{error: misconfigured, error_description: invalid android_key_hash or ios_bundle_id or web_site_url}

제가 겪고있는 이슈 상황을 조금 더 구체적으로 설명드리면 제 어플리케이션에서 카카오톡이 없을 경우 loginWithKakaoAccount()를 호출하여 카카오 계정 로그인하는 창으로 넘어가고 아이디와 비밀번호를 입력하고 로그인을 시도하면 이전 화면으로 넘어오며 아무 응답이 없습니다. 디버깅을 해본 결과 해당 함수에서 멈추는데요.

Future _issueAccessToken(data, {OAuthToken? oldToken}) async {
return await ApiFactory.handleApiError(() async {
Response response = await _dio.post(Constants.tokenPath, data: data);
final tokenResponse = AccessTokenResponse.fromJson(response.data);
return OAuthToken.fromResponse(tokenResponse, oldToken: oldToken);
});
}

엑세스토큰 문제가 있을까요?

안녕하세요.

(1) 처음 문의 주신 상황과 무관한 에러로 디벨로퍼스 설정에 키해시 또는 사이트 URL 등록하지 않아 발생한 에러 입니다.

{“error”:“misconfigured”,“error_description”:“invalid android_key_hash or ios_bundle_id or web_site_url”,“error_code”:“KOE009”}

(2) 897607 디벨로퍼스앱에는 아무런 에러가 없는데요. 설정하신 앱키가 897607앱의 앱키가 맞는지 확인해주시겠어요?

답변 감사합니다!

  1. 897607 (lottobot) 네이티브 앱키, 자바스크립트 앱키 모두 동일합니다. 키를 다르게 주고 해도 응답이 오지 않는건 마찬가지네요? 원래 그런걸까요?