|
@@ -6,12 +6,6 @@ import C from 'rn-class'
|
|
|
|
|
|
C.addColor("#03cf5d", "color-naver");
|
|
C.addColor("#03cf5d", "color-naver");
|
|
|
|
|
|
-// const initials = {
|
|
|
|
-// kConsumerKey: 'VWv4bOdB5Bf07a26eJ5h',
|
|
|
|
-// kConsumerSecret: 'pBASnpI7X5',
|
|
|
|
-// kServiceAppName: 'empty',
|
|
|
|
-// kServiceAppUrlScheme: 'naverorgseonsujoaemptyapp', // only for iOS
|
|
|
|
-// };
|
|
|
|
|
|
|
|
export default (props)=>{
|
|
export default (props)=>{
|
|
|
|
|
|
@@ -48,154 +42,3 @@ export default (props)=>{
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-// const googoleSignIn = async () => {
|
|
|
|
-// GoogleSignin.configure();
|
|
|
|
-// try {
|
|
|
|
-// await GoogleSignin.hasPlayServices();
|
|
|
|
-// const result = await GoogleSignin.signIn();
|
|
|
|
-
|
|
|
|
-// console.log(result);
|
|
|
|
-// } catch (error) {
|
|
|
|
-// if (error.code === statusCodes.SIGN_IN_CANCELLED) {
|
|
|
|
-// // user cancelled the login flow
|
|
|
|
-// console.log('cancel',error);
|
|
|
|
-// } else if (error.code === statusCodes.IN_PROGRESS) {
|
|
|
|
-// // operation (f.e. sign in) is in progress already
|
|
|
|
-// console.log('progress',error);
|
|
|
|
-// } else if (error.code === statusCodes.PLAY_SERVICES_NOT_AVAILABLE) {
|
|
|
|
-// // play services not available or outdated
|
|
|
|
-// console.log('service not available',error);
|
|
|
|
-// } else {
|
|
|
|
-// // some other error happened
|
|
|
|
-// console.log(error)
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// };
|
|
|
|
-
|
|
|
|
-// const facebookLogin = async () => {
|
|
|
|
-
|
|
|
|
-// const data = await AccessToken.getCurrentAccessToken();
|
|
|
|
-// if(data) {
|
|
|
|
-// console.log('이전에 로그인한 경우 정보 가져오기', data.userID);
|
|
|
|
-// } else {
|
|
|
|
-// const result = await LoginManager.logInWithPermissions(['public_profile']);
|
|
|
|
-
|
|
|
|
-// if (result.isCancelled) {
|
|
|
|
-// // handle this however suites the flow of your app
|
|
|
|
-// throw new Error('User cancelled request');
|
|
|
|
-// }
|
|
|
|
-// console.log(result);
|
|
|
|
-// console.log(`Login success with permissions: ${result.grantedPermissions.toString()}`);
|
|
|
|
-
|
|
|
|
-// // get the access token
|
|
|
|
-// const data = await AccessToken.getCurrentAccessToken();
|
|
|
|
-// console.log('acess data', data);
|
|
|
|
-// // await AccessToken.setCurrentAccessToken(data);
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
-// const authLogin = () => {
|
|
|
|
-// props.navigation.navigate('AcceptTerms');
|
|
|
|
-// }
|
|
|
|
-// const kakaoLogin = async () => {
|
|
|
|
-// const resultInfor = await getKakaoUserInfo();
|
|
|
|
-// if(resultInfor.loginError) {
|
|
|
|
-// try {
|
|
|
|
-// const result = await RNKakao.login();
|
|
|
|
-
|
|
|
|
-// console.log(result);
|
|
|
|
-// } catch (e) {
|
|
|
|
-
|
|
|
|
-// console.log(`Error: ${e}`);
|
|
|
|
-
|
|
|
|
-// }
|
|
|
|
-// } else {
|
|
|
|
-// console.log(resultInfor);
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
-// const kakaoLogout = async () => {
|
|
|
|
-// try {
|
|
|
|
-// const result = await RNKakao.logout();
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-// console.log(result);
|
|
|
|
-
|
|
|
|
-// } catch (e) {
|
|
|
|
-
|
|
|
|
-// console.log(`Error: ${e}`);
|
|
|
|
-
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
-// const getKakaoUserInfo = async () => {
|
|
|
|
-// try {
|
|
|
|
-// const result = await RNKakao.userInfo();
|
|
|
|
-// console.log(result);
|
|
|
|
-// return result;
|
|
|
|
-
|
|
|
|
-// } catch (e) {
|
|
|
|
-
|
|
|
|
-// console.log(e);
|
|
|
|
-// return {loginError:e};
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-// const naverLogin = async (props) => {
|
|
|
|
-// NaverLogin.login(initials, (err, token) => {
|
|
|
|
-// console.log(`\n\n Token is fetched :: ${token} \n\n`);
|
|
|
|
-// // this.setState();
|
|
|
|
-// console.log({ theToken: token });
|
|
|
|
-// getNaverProfile(token);
|
|
|
|
-// if (err) {
|
|
|
|
-// console.log(err);
|
|
|
|
-// return;
|
|
|
|
-// }
|
|
|
|
-// });
|
|
|
|
-// };
|
|
|
|
-
|
|
|
|
-// const getNaverProfile = async(token) => {
|
|
|
|
-// let result = null;
|
|
|
|
-// try {
|
|
|
|
-// result = await getProfile(token);
|
|
|
|
-// } catch (err) {
|
|
|
|
-// console.log('err');
|
|
|
|
-// console.log(err);
|
|
|
|
-// }
|
|
|
|
-// console.log(result);
|
|
|
|
-// return result;
|
|
|
|
-// }
|
|
|
|
-// const naverLogout = () => {
|
|
|
|
-// NaverLogin.logout();
|
|
|
|
-// }
|
|
|
|
-// const facebookLogout = () => {
|
|
|
|
-// console.log('facebook')
|
|
|
|
-// LoginManager.logOut();
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
-// const googleLogout = async () => {
|
|
|
|
-// GoogleSignin.configure();
|
|
|
|
-// try {
|
|
|
|
-
|
|
|
|
-// //await GoogleSignin.revokeAccess();
|
|
|
|
-// await GoogleSignin.signOut();
|
|
|
|
-
|
|
|
|
-// } catch (error) {
|
|
|
|
-// console.error(error);
|
|
|
|
-// }
|
|
|
|
-// };
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-// const snsLogout = () => {
|
|
|
|
-
|
|
|
|
-// naverLogout();
|
|
|
|
-// facebookLogout();
|
|
|
|
-// kakaoLogout();
|
|
|
|
-// googleLogout();
|
|
|
|
-
|
|
|
|
-// }
|
|
|