WindSekirun / RxSocialLogin

An Android Library that provides social login for 15 platforms within by RxJava2, Kotlin and Firebase Authentication.
Apache License 2.0
125 stars 19 forks source link

Check 'NotSupportError' on KakaoLogin #38

Closed WindSekirun closed 5 years ago

WindSekirun commented 5 years ago

Error log: Bundle[{com.kakao.sdk.talk.error.type=NotSupportError, com.kakao.sdk.talk.error.description=KakaoTalk is installed but not connected to Kakao account.}]

We can find this logs from KakaoLogin.onActivityResult. this exception will be passed into onSessionClosed methods, but the message is 'authentication failed'

Situation: The user installed KakaoTalk application in the device, but not connected any account of Kakao

WindSekirun commented 5 years ago

We can check 'NotSupportedError' state by EXTRA_ERROR_TYPE('com.kakao.sdk.talk.error.type') and EXTRA_ERROR_DESCRIPTION('com.kakao.sdk.talk.error.description').

There are some situations to check before debugging.

  1. Extras of intent are a null-able state, so null extras aren't indicating fail state. (According to WebAuthService)
  2. If EXTRA_ERROR_TYPE and EXTRA_ERROR_DESCIPRION are not null, it will indicate fail state and we can provide EXTRA_ERROR_DESCRIPTION by the message of exception.
  3. This constant value can be changed always if Kakao upgrades their SDKs.
  4. Check by bundle extras is dangerous. it should check on when user has KakaoTalk application.

So we should test with TalkAuthService(KakaoTalk application is installed in the device), StoryAuthService (KakaoStory application is installed in the device) and WebAuthService(Neither application isn't installed)