crossplatformkorea / react-native-naver-login

리엑트 네이티브 네이버 로그인 라이브러리
MIT License
157 stars 89 forks source link

로그인 중 Cancel 누를 시 제어할 수 있는 Error 반환 #62

Closed RINDAMAN2426 closed 1 year ago

RINDAMAN2426 commented 4 years ago

Version of naver-login libraries

^2.1.0

Version of react-native

0.62.2

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

IOS

Expected behavior

kakao-login처럼 로그인 시도 중 Cancel을 누를 시 제어할 수 있는 Error값

Actual behavior

Cancel시 아무런 Error값 발생하지 않습니다

Tested environment (Emulator? Real Device?)

iPhone 11 (Emulator)

nnnnnoel commented 4 years ago

@cdbrouk 주말 내에 확인해보겠습니다! 감사합니다!

RINDAMAN2426 commented 4 years ago

@zusinShinpei 감사합니다! 혹시 그리고 로그인시도 시 필수사항 체크하고 넘어가면 페이지를 찾을 수 없습니다 라고 나오는데 emulator의 웹뷰에서 나오는 에러라 확인이 어려워서 혹시 확인할 수 있는 방법이 있을지 여쭤봅니다

nnnnnoel commented 4 years ago

@cdbrouk 해당 에러는 재현 경로 및 스크린샷 추가하여 이슈에 따로 올려주시면 감사하겠습니다 :)

RINDAMAN2426 commented 4 years ago

@zusinShinpei 방금 여쭤봤던 내용은 제가 URL Schemes에 언더바를 넣어놨어서 Call Back이 계속 오류났던 것 같습니다! 언더바빼고 해결했습니다!

hyundae313 commented 3 years ago

@zusinShinpei @cdbrouk 로그인 시도시 사용자가 컨펌창에서 취소를 눌렀을때 처리를 어떻게 해야 하나요?? 아무것도 반환하지는 않는거 같은데....

RINDAMAN2426 commented 3 years ago

저도 아직 따로 처리를 못했습니다ㅠㅠ

2020년 8월 3일 (월) 오후 5:15, hyundae313 notifications@github.com님이 작성:

@zusinShinpei https://github.com/zusinShinpei @cdbrouk https://github.com/cdbrouk 로그인 시도시 사용자가 컨펌창에서 취소를 눌렀을때 처리를 어떻게 해야 하나요?? 아무것도 반환하지는 않는거 같은데....

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/react-native-seoul/react-native-naver-login/issues/62#issuecomment-667879722, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALTJTDIIJRWYUYT2LLFD7GDR6ZW27ANCNFSM4N4GQXQA .

mintwoo commented 3 years ago

혹시 이 이슈 해결이 되었나요???저도 같은 현상이 있습니다ㅠ

woojunro commented 2 years ago

해당 이슈 해결하신 분 있으신가요? 유저가 cancel 시 callback에서 reject이 호출되면 좋을 것 같습니다

swkang0513 commented 2 years ago

이렇게 하는게 맞는지는 모르겠지만 일단 저는 이런 방식으로 해결했습니다.

const naverLogin = async () => {
    await new Promise((resolve, reject) => {
      NaverLogin.login(initials, (err, token) => {
        if (token) {
          setNaverToken(token);
        }
        if (err) {
          reject(err);
          return;
        }
        resolve(token);
      });
    }).catch(err => {
      switch (err.errCode) {
        case 'user_cancel':
          // 사용자 취소 처리
          break;
        default:
          break;
      }
    });
  };
yhl0519 commented 2 years ago
스크린샷 2021-09-29 오후 2 56 17 스크린샷 2021-09-29 오후 2 51 40

저도 같은문제입니다ㅜㅜ 저 화면들에서 Cancel을 클릭 했을때 리턴이 없습니다ㅜㅜ

mym0404 commented 1 year ago

현재 최신 버전인 2.3.1 버전으로 시도해보시고 문제가 있으시면 다시 댓글 남겨주세요.

pickn-HC commented 1 year ago

@mym0404 네이버로 로그인하겠냐는 팝업(위의 댓글에서 두개의 이미지 중 첫번째 이미지)에서 취소버튼을 눌렀을 때 login 함수에서 response로 여전히 아무것도 주지 않습니다. 현재 버전은 ^3.0.0-rc.1 입니다.