crossplatformkorea / react-native-kakao-login

react-native native module for Kakao sign in.
MIT License
358 stars 135 forks source link

getAccessToken 값이 잘못 반환되는 것 같네요. #271

Closed art-c closed 2 years ago

art-c commented 2 years ago

Version of kakao-login libraries

3.3.4

Version of react-native

0.64.1

Platforms you faced the error (IOS or Android or both?)

현재 Android만 테스트 IOS는 모름.

Expected behavior

예상 출력 결과: {"accessToken": "QbNhWoyjJjb52DuoLK_xxxxxxxxxxx-hxL2UBxxxxxxxxxxxx", "expiresIn": "43199"} , 현재 출력 결과 : {"accessToken": "1804xxxxx", "expiresIn": "43199"}

Actual behavior

현재 로그인 했던 access-token을 가끔 가져와야해야하는데, 가져오는 API가 잘못된 값을 보내주어, 현재 access-token을 알기위해서는 다시 따로 저장해서 사용해야합니다.

Tested environment (Emulator? Real Device?)

device

kr-yeon commented 2 years ago

기존 getAccessToken는 com.kakao.sdk.user.UserApiClient.accessTokenInfo를 가지고 오고 있습니다. 하지만 AccessTokenInfo에는 id, expiresIn, appId, expiresInMillis값만 있으며, 기존 AccessToken과 일치하는 결과를 얻을 수 없었습니다.

kr-yeon commented 2 years ago

274

로그인시 토큰은 저장됩니다. 저장된 토큰을 불러와 get하여, 오류를 수정했습니다. com.kakao.sdk.auth.TokenManagerProvider

marge되면 Close하겠습니다.

kr-yeon commented 2 years ago

ios또한 같은 문제가 발생하기에 동일한 brunch에 commit했습니다.