crossplatformkorea / react-native-kakao-login

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

[Typing] KakaoProfile id 값의 type이 string으로 지정되어있는데, 실사용시 non string value로 들어오는 것 같습니다. #240

Closed Hemistone closed 2 years ago

Hemistone commented 3 years ago

Version of kakao-login libraries

3.3.2

Version of react-native

0.64.1

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

both

Expected behavior

KakaoProfile type에 있는 idstring으로 되어있기에 id로 string타입을 받는 graphql mutation의 typing 검사에 문제 없이 작동해야합니다.

Actual behavior

string으로 선언되어있는 KakaoProfileidnon string value로 인식되어 오류가 납니다. (id가 숫자형태로 들어오는 것을 보니 실제 데이터는 아마 number 타입이지 않을까 합니다)

라이브러리 내부에서 number일 경우 string으로의 변환을 시켜주거나, id의 type을 number로 변경하거나 추가하는게 필요할 것 같습니다.

구글 로그인, 애플 로그인 등의 다른 소셜 로그인들을 통한 동일한 mutation 실행에서는 아래 사진에서 보이는 credential.socialId에서 에러가 발생하지 않고 정상적으로 잘 작동하였습니다.

Screen Shot 2021-07-12 at 21 51 53

Tested environment (Emulator? Real Device?)

iPhone12 emulator

Hemistone commented 3 years ago

받은 id를 typescript를 무시하고 id.toString()을 해본 다음 시도해보니 정상적으로 작동됩니다. id에 typing 관련 이슈가 있는게 맞는 것 같습니다.