crossplatformkorea / react-native-kakao-login

react-native native module for Kakao sign in.
MIT License
350 stars 133 forks source link

Deep Link does not contain valid required params. URL params #198

Closed Wanderlust-sol closed 3 years ago

Wanderlust-sol commented 3 years ago

Version of kakao-login libraries

v3.0.2

Version of react-native

v0.63.3

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

ios

Expected behavior

카카오 로그인 성공

Actual behavior

v2 버전에서 잘 작동중이던 카카오 로그인이 업데이트 이후

Deep Link does not contain valid required params. URL params: {
    code = "X3hEHzTdKnsQ4P2s4q3gAE-GajdQ6tuITzcoN8xSZlkn8obxWIEJQyA2ZnsUDgDxgoDpVwo9dZwAAAF4XiFiMg";
}

이와 같이 쓰여져 있고 로그인이 되지 않습니다.

어제 업데이트 이후 똑같은 문제가 지속적으로 발생

const onPressKakao = async (): Promise<void> => {
    const token = await login();
    console.log('token', token); // 안찍힘.. login부터 작동이 안되는걸로 추정됩니다.
    const profile: KakaoProfile = await getKakaoProfile();
    console.log(profile);
  };

Tested environment (Emulator? Real Device?)

iphone XS. (v14.4.1)

Wanderlust-sol commented 3 years ago
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(nonnull NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options
{ if ([RNKakaoLogins isKakaoTalkLoginUrl:url]) {
    return [RNKakaoLogins handleOpenUrl:url];
}

  return false;
}

위와 같이 AppDelegate.m 파일에 추가 후 해결되었습니다:)

hyochan commented 3 years ago
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(nonnull NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options
{ if ([RNKakaoLogins isKakaoTalkLoginUrl:url]) {
    return [RNKakaoLogins handleOpenUrl:url];
}

  return false;
}

위와 같이 AppDelegate.m 파일에 추가 후 해결되었습니다:)

넵 해당부분은 리드미에 작성 완료했습니다.

https://github.com/react-native-seoul/react-native-kakao-login/issues/193#issuecomment-806475082