Sfoglia il codice sorgente

+ 구글 간편로그인/ 회원가입 처리완료

송용우 5 mesi fa
parent
commit
086634270c

+ 110 - 3
assets/scss/style.scss

@@ -677,9 +677,31 @@
 .txt-field-box {
   position: relative;
   width: 100%;
+  
+  &.email{
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    gap:10px;    
+    > div{
+      width:calc( (100% - 30px) / 2);
+    }
+  }
 
+  &.phone{
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    gap:10px;    
+    > div{
+      width:calc( (100% - 60px) / 3);
+    }
+  }
+
+  
   &.error {
     .custom-input.v-text-field {
+      
       .v-input__control {
         .v-field__field {
           .v-field__input {
@@ -745,9 +767,11 @@
     }
   }
 
+  &.v-input--disabled,
   &.v-input--is-disabled {
-    background: #f6f6f6 !important;
-
+    input{
+       background: #f6f6f6 !important;
+    }
     .v-input__prepend-outer {
       .v-input__icon {
         opacity: 0.5;
@@ -759,6 +783,7 @@
         .v-text-field__slot {
           input {
             color: #999;
+           
           }
         }
       }
@@ -3472,10 +3497,19 @@ p.success-txt {
   height: 100%;
   padding: 3.63rem 0;
   background: #F2F6FF;
+  &.type--join{
+    overflow-y: auto;
+    .login-box {
+      height: auto;
+      padding:45px 0px!important;
+      background: #fff;
+    }
+  }
+
 
   .login-box {
     display: flex;
-    height: 43.63rem;
+    height: 43.63rem;    
 
     .login-l {
       flex-shrink: 0;
@@ -3522,12 +3556,30 @@ p.success-txt {
       flex-direction: column;
       justify-content: center;
 
+
+      .mk--title{
+        font-size:35px;
+        font-weight: 900;
+        margin-bottom:45px;
+      }
+      
       .tit-login {
         display: flex;
         justify-content: space-between;
         align-items: center;
         margin-bottom: 1.88rem;
 
+        > span{
+          font-size: 14px;
+          font-weight: bold;
+          i{
+            color:red;
+            font-style: normal;
+            margin-right: 3px;
+            position: relative;
+            top:2px;
+          }
+        }
         strong {
           color: #333;
           font-size: 1.38rem;
@@ -3549,6 +3601,7 @@ p.success-txt {
         width: 100%;
 
         .txt-field-box {
+          margin-bottom: 0.63rem;
           &:first-of-type {
             margin-bottom: 0.63rem;
           }
@@ -6078,4 +6131,58 @@ body:has(.darkmode) {
     }
   }
 
+}
+
+
+.join--btn--wrap{
+  margin-top:10px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  gap:20px;
+  .v-btn{
+    position: relative;
+    &:before{
+      content: '';
+      display: block;
+      width:1px!important;
+      height:10px!important;
+      border:0px;
+      background: #ccc!important;
+      position: absolute;
+      top: 50%;
+      left:calc(100% + 9px);
+      transform: translateY(-50%);
+      opacity: 1;
+    }
+
+    &:last-child{
+      &:before{
+        display: none;
+      }
+    }
+
+    &.text--btn{
+      border-radius: 0px!important;
+      padding:0px!important;    
+      font-weight: bold;
+      width: auto!important;      
+      box-shadow: none!important;
+      *{
+        color:#222!important;
+      }
+      &:hover{
+        opacity: .6;
+      }
+    }
+  }
+}
+
+.join--type{
+  padding:20px 0px;
+  .v-label{
+    font-size:16px!important;
+    font-weight: 700;
+    color: #333;
+  }
 }

+ 46 - 6
components/common/header.vue

@@ -2,23 +2,25 @@
   <header class="new--header">
     <div class="pro--wrap">
       <div class="pro--img"></div>
-      <div class="pro--id" @click="proOn ? proOn = false : proOn = true ">
+      <div class="pro--id" @click="proOn ? (proOn = false) : (proOn = true)">
         {{ userId }} <i class="ico" :class="[proOn ? 'on' : '']">></i>
         <div class="id--box" v-show="proOn">
           <button type="button" class="btn-profile" @click="myPage(userId)">
             마이페이지
           </button>
+          <button type="button" class="btn-profile" @click="withdrawal">회원탈퇴</button>
           <button type="button" class="btn-logout" @click="fnLoguOut">로그아웃</button>
         </div>
       </div>
-      <div class="pro--info inf">
-        인플루언서
-      </div>
+      <div class="pro--info inf">인플루언서</div>
     </div>
     <nav class="gnb">
       <ul class="depth1">
         <li v-for="(menu, index) in arrMenuInfo" :key="index">
-          <button @click="menuAction(menu.menuId, menu.menuName, menu.linkType)" :class="{ actv: menu.linkType === $route.path }">
+          <button
+            @click="menuAction(menu.menuId, menu.menuName, menu.linkType)"
+            :class="{ actv: menu.linkType === $route.path }"
+          >
             {{ menu.menuName }}
           </button>
         </li>
@@ -36,6 +38,7 @@
   const pageId = "header";
   const arrMenuInfo = ref([]); // 메뉴정보
   const useStore = useDetailStore();
+  const useStoreAuth = useAuthStore();
   const userName = ref("");
   const userCompanyName = ref("");
   const userId = ref("");
@@ -84,7 +87,7 @@
         parentMenuId: "menu05",
         menuName: "고객센터",
         linkType: "/view/cs",
-    }
+      }
     );
 
     arrMenuInfo.value = info;
@@ -114,6 +117,43 @@
     useDtStore.adminInfo.adminId = userId;
     useDtStore.adminInfo.pageType = "U";
   };
+
+  const withdrawal = () => {
+    let _req = {
+      SEQ: useStoreAuth.getSnsTempData.user.SEQ,
+      GOOGLE_REFRESH_TOKEN: useStoreAuth.getSnsTempData.user.GOOGLE_REFRESH_TOKEN,
+    };
+
+    useAxios()
+      .post("/auth/withdrawal", _req)
+      .then((res) => {
+        localStorage.removeItem("tempAccess");
+        useStore.getSnsTempData = "";
+        useAuthStore().setLogout();
+        router.push({
+          path: "/",
+        });
+      })
+      .catch((error) => {
+        if (error.response) {
+          console.log("status:", error.response.status, "data:", error.response.data);
+          // 안전하게 errCode, message 접근
+          const errData = error.response.data || {};
+          const errCode = errData.errCode || errData.errorCode || errData.code || "";
+          const errMsg = errData.message || "알 수 없는 오류가 발생했습니다.";
+          console.log("errCode:", errCode, "message:", errMsg);
+        } else {
+          console.log("error:", error.message, error.code);
+        }
+        if (error.response?.status) {
+          fnLoginSet(error.response.data.messages.message);
+        }
+        $log.debug("[withdrawal][fnIdPwCheck][error]");
+      })
+      .finally(() => {
+        $log.debug("[withdrawal][fnIdPwCheck][finished]");
+      });
+  };
   /************************************************************************
 |    라이프사이클 : onMounted
 ************************************************************************/

+ 6 - 1
middleware/auth.global.js

@@ -3,7 +3,12 @@ import { useAuthStore } from '@/stores/auth'
 export default defineNuxtRouteMiddleware(async (to, from) => {
   const { $log } = useNuxtApp()
   // 로그인 없이 접근 가능한 페이지 배열에 '/roulette' 추가
-  const tokenPassPages = ['/', '/roulette','/roulette/','/auth/popupClose','auth/popupClose']
+  const tokenPassPages = [
+    '/', 
+    '/roulette',    
+    '/auth/popupClose',    
+    '/auth/join'
+  ]
   //let accountValue = useAuthStore().getAccountRole.charAt(0).toUpperCase()
 
   // 1. 로그인 없이 접근 가능한 페이지 예외 허용 (이미 로그인 상태면 메인으로 이동)

+ 362 - 0
pages/auth/join.vue

@@ -0,0 +1,362 @@
+<template>
+  <div class="login-wrap type--join">
+    <!-- header -->
+    <div class="login--header">
+      <div class="login--header--l">
+        <div class="logo">
+          <!-- prettier-ignore  -->
+          SHOPDELI
+        </div>
+      </div>
+      <div class="login--header--r"></div>
+    </div>
+    <!-- login -->
+    <div class="login-box type--join">
+      <div class="login-r">
+        <h2 class="mk--title">{{ titleh }}</h2>
+        <div class="join--type">
+          <v-radio-group v-model="form.formValue0" row inline class="custom-radio type2">
+            <v-radio value="Y" label="인플루언서"></v-radio>
+            <v-radio value="N" label="벤더"></v-radio>
+          </v-radio-group>
+        </div>
+        <div class="tit-login">
+          <strong>회원가입</strong>
+          <span><i>*</i>필수입력 항목</span>
+        </div>
+        <div class="login-input-wrap">
+          <div class="txt-field-box">
+            <v-text-field
+              :disabled="useStore.getSnsTempData?.ID ? true : false"
+              v-model="form.formValue1"
+              placeholder="아이디를 입력해주세요"
+              class="custom-input"
+            ></v-text-field>
+          </div>
+
+          <div class="txt-field-box">
+            <v-text-field
+              v-model="form.formValue2"
+              :type="visible ? 'text' : 'password'"
+              placeholder="패스워드를 입력해주세요."
+              class="custom-input"
+              id="password"
+            ></v-text-field>
+            <i
+              class="ico-eye"
+              @click.stop="toggleVisibility"
+              :class="visible ? 'eye-on' : 'eye-off'"
+            ></i>
+            <i class="ico"></i>
+          </div>
+
+          <div class="txt-field-box">
+            <v-text-field
+              v-model="form.formValue3"
+              :type="visible ? 'text' : 'password'"
+              placeholder="패스워드 확인"
+              class="custom-input"
+            ></v-text-field>
+            <i
+              class="ico-eye"
+              @click.stop="toggleVisibility"
+              :class="visible ? 'eye-on' : 'eye-off'"
+            ></i>
+            <i class="ico"></i>
+          </div>
+
+          <div class="txt-field-box">
+            <v-text-field
+              v-model="form.formValue4"
+              :maxlength="20"
+              :counter="20"
+              :placeholder="'닉네임을 입력해주세요.'"
+              class="custom-input"
+            ></v-text-field>
+          </div>
+
+          <div class="txt-field-box">
+            <v-text-field
+              v-model="form.formValue5"
+              :disabled="useStore.getSnsTempData?.NAME ? true : false"
+              :maxlength="20"
+              :counter="20"
+              placeholder="이름을 입력해주세요"
+              class="custom-input"
+            ></v-text-field>
+          </div>
+
+          <div class="txt-field-box">
+            <v-select
+              v-model="form.formValue6"
+              :items="form.formValueItems6"
+              item-title="text"
+              item-value="value"
+              class="custom-select"
+            ></v-select>
+          </div>
+          <div class="txt-field-box">
+            <v-text-field
+              v-model="form.formValue7"
+              placeholder="소셜 ID 또는 주소를 입력해주세요."
+              class="custom-input"
+            ></v-text-field>
+          </div>
+
+          <div class="txt-field-box phone">
+            <v-text-field
+              placeholder=""
+              class="custom-input"
+              v-model="form.formValue8"
+            ></v-text-field>
+            -
+            <v-text-field
+              placeholder="1234"
+              class="custom-input"
+              v-model="form.formValue9"
+            ></v-text-field>
+            -
+            <v-text-field
+              placeholder="5678"
+              class="custom-input"
+              v-model="form.formValue10"
+            ></v-text-field>
+          </div>
+
+          <div class="txt-field-box email">
+            <v-text-field
+              v-model="form.formValue12"
+              :disabled="useStore.getSnsTempData?.EMAIL"
+              class="custom-input"
+              placeholder=""
+            ></v-text-field>
+            <span v-if="form.formValue11 != 'direct'">@</span>
+            <v-select
+              :disabled="useStore.getSnsTempData?.EMAIL ? true : false"
+              v-model="form.formValue11"
+              :items="form.formValueItems11"
+              item-title="text"
+              item-value="value"
+              class="custom-select"
+            ></v-select>
+          </div>
+
+          <div class="txt-field-box">
+            <v-textarea
+              v-model="form.formValue13"
+              placeholder="자기소개를 입력해주세요. 벤더사들이 참고할 수 있도록 작성해주세요."
+              class="custom-textarea"
+              rows="3"
+            ></v-textarea>
+          </div>
+        </div>
+        {{ useStore.getSnsTempData }}
+
+        <div class="login-btn-wrap">
+          <v-btn class="custom-btn btn-blue" @click.stop="joinMember">회원가입</v-btn>
+        </div>
+      </div>
+    </div>
+
+    <!-- footer -->
+    <div class="login-footer">
+      <div class="login--footer--l">
+        <p>COPYRIGHT@2025 SHOPDELI INC. ALL RIGHTS RESERVED.</p>
+        <p>마포구 합정동</p>
+      </div>
+    </div>
+  </div>
+</template>
+<script setup>
+  /************************
+   *    import
+   ************************/
+  import apiUrl from "@/composables/useApi";
+  import { useI18n } from "vue-i18n";
+
+  /************************
+   *    layout setting
+   ************************/
+  definePageMeta({
+    layout: "loginlayout",
+  });
+
+  /************************
+   *    전역
+   ************************/
+  const titleh = ref("인플루언서");
+  const useStore = useAuthStore();
+
+  //인플루언서 폼
+  const form = ref({
+    formValue0: "Y",
+    formValue1: useStore.getSnsTempData?.ID || "", // 아이디
+    formValue2: "", // 패스워드
+    formValue3: "", // 패스워드 확인
+    formValue4: "", // 닉네임
+    formValue5: useStore.getSnsTempData?.NAME || "", // 이름
+    formValue6: "소셜채널 선택", // 소셜 채널
+    formValueItems6: [
+      {
+        text: "유튜브",
+        value: "youtube",
+      },
+      {
+        text: "인스타",
+        value: "instagram",
+      },
+      {
+        text: "네이버 블로그",
+        value: "naverblog",
+      },
+      {
+        text: "네이버 카페",
+        value: "navercafe",
+      },
+      {
+        text: "스마트스토어",
+        value: "smartstore",
+      },
+    ], // 소셜 채널 아이템
+    formValue7: "", // 소셜 ID 또는 주소
+    formValue8: "010", // 휴대폰1
+    formValue9: "", // 휴대폰2
+    formValue10: "", // 휴대폰3
+    formValue11: "email", // 이메일1
+    formValueItems11: [
+      {
+        text: "이메일 선택",
+        value: "email",
+      },
+      {
+        text: "직접입력",
+        value: "direct",
+      },
+      {
+        text: "naver.com",
+        value: "naver",
+      },
+      {
+        text: "gmail.com",
+        value: "gmail",
+      },
+      {
+        text: "daum.net",
+        value: "daum",
+      },
+    ], // 이메일 아이템
+    formValue12: "", // 이메일2
+    formValue13: "", // 자기소개
+  });
+
+  //밴더 폼
+  const formVendor = ref({
+    formValue0: "N",
+    formValue1: "", // 아이디
+    formValue2: "", // 패스워드
+    formValue3: "", // 패스워드 확인
+    formValue4: "", // 닉네임
+    formValue5: "", // 이름
+    formValue6: "소셜채널 선택", // 소셜 채널
+  });
+
+  /************************
+   *    함수
+   ************************/
+
+  const joinMember = () => {
+    /*
+      제출내용 :
+      1. 인플루언서
+        일반회원 인경우
+        - 아이디
+        - 패스워드
+        - 패스워드 확인
+        - 닉네임
+        - 이름
+        - 소셜 채널
+        - 소셜 ID 또는 주소
+        - 휴대폰 번호
+        - 이메일
+        - 자기소개
+
+
+      2. 소셜계정일경우
+        - 아이디 : 자동입력
+        - 패스워드 : 비번은 미입력
+        - 패스워드 확인 : 비번은 미입력
+        - 닉네임
+        - 이름 : 자동입력
+        - 소셜 채널
+        - 소셜 ID 또는 주소
+        - 휴대폰 번호
+        - 이메일 : 자동입력
+        - 자기소개
+    */
+
+    // 여기에 폼 제출 로직을 추가하세요.
+    let _req = {
+      ID: form.value.formValue1,
+      PASSWORD: form.value.formValue2,
+      NAME: form.value.formValue5,
+      NICK_NAME: form.value.formValue4 || "", //닉네임 없으면 빈문자
+      PHONE: `${form.value.formValue8}-${form.value.formValue9}-${form.value.formValue10}`,
+      EMAIL: form.value.formValue12,
+      SNS_TYPE: form.value.formValue6,
+      SNS_LINK_ID: form.value.formValue7,
+      ADD_INFO1: form.value.formValue13,
+      GOOGLE_REFRESH_TOKEN: useStore.getSnsTempData?.GOOGLE_REFRESH_TOKEN || "",
+      TYPE: useStore.getSnsTempData ? "1" : "0", // SNS 가입일경우 1, 일반회원 가입일경우 0
+    };
+
+    useAxios()
+      .post("/auth/joinmember", _req)
+      .then((res) => {
+        if (_req.TYPE === "1") {
+          // SNS 가입일 경우
+          useStore.setTempData("");
+        }
+        useUtil.setPageMove("/");
+      })
+      .catch((error) => {
+        if (error.response) {
+          console.log("status:", error.response.status, "data:", error.response.data);
+          // 안전하게 errCode, message 접근
+          const errData = error.response.data || {};
+          const errCode = errData.errCode || errData.errorCode || errData.code || "";
+          const errMsg = errData.message || "알 수 없는 오류가 발생했습니다.";
+          console.log("errCode:", errCode, "message:", errMsg);
+        } else {
+          console.log("error:", error.message, error.code);
+        }
+        if (error.response?.status) {
+          fnLoginSet(error.response.data.messages.message);
+        }
+        $log.debug("[join][fnIdPwCheck][error]");
+      })
+      .finally(() => {
+        $log.debug("[join][fnIdPwCheck][finished]");
+      });
+  };
+
+  /************************
+   *    마운트
+   ************************/
+  onMounted(() => {
+    if (useStore.getSnsTempData?.EMAIL) {
+      form.value.formValue12 = useStore.getSnsTempData.EMAIL;
+      form.value.formValue11 = "direct"; // 이메일 직접입력으로 설정
+    }
+  });
+
+  watch(
+    () => form.value.formValue0,
+    (newValue) => {
+      if (newValue === "Y") {
+        titleh.value = "인플루언서";
+      } else {
+        titleh.value = "벤더";
+      }
+    }
+  );
+</script>

+ 11 - 1
pages/auth/popupClose.vue

@@ -7,7 +7,17 @@
     const refreshToken = q.get("refreshToken");
     const user = q.get("user") ? JSON.parse(decodeURIComponent(q.get("user"))) : null;
 
-    if (accessToken && window.opener) {
+    // If joinType is 'influencer', you can handle it here if needed
+    if (user.JOIN === "1") {
+      window.opener.postMessage(
+        {
+          user,
+        },
+        "http://0.0.0.0:3000"
+      );
+
+      window.close();
+    } else if (accessToken && window.opener) {
       window.opener.postMessage(
         {
           accessToken,

+ 72 - 925
pages/index.vue

@@ -72,6 +72,11 @@
             >로그인</v-btn
           >
         </div>
+        <div class="join--btn--wrap">
+          <v-btn class="custom-btn text--btn">아이디 찾기</v-btn>
+          <v-btn class="custom-btn text--btn">비밀번호 찾기</v-btn>
+          <v-btn class="custom-btn text--btn" @click="location('join')">회원가입</v-btn>
+        </div>
         <div class="short--login--wrap">
           <v-btn class="btn--google" @click="onGoogleLogin"></v-btn>
           <v-btn class="btn--kakao"></v-btn>
@@ -223,6 +228,7 @@
     },
     btnTxt: "",
   });
+
   // 초기 패스워드 변경
   const initPw = ref({
     popYn: false,
@@ -318,29 +324,57 @@
       });
   };
 
+  const location = (__id) => {
+    switch (__id) {
+      case "join":
+        useUtil.setPageMove("/auth/join");
+        break;
+      case "findId":
+        findId.value.popYn = true;
+        break;
+      case "resetPw":
+        resetPw.value.popYn = true;
+        break;
+      default:
+        break;
+    }
+  };
+
   // onMounted
   onMounted(() => {
     function handleMessage(event) {
       // 개발환경이면 아래처럼 확인
       if (
-        event.origin === "http://0.0.0.0:3000" ||
-        event.origin === "http://localhost:3000"
+        event.origin === "http://0.0.0.0:3000" || //배포시 도메인 변경
+        event.origin === "http://localhost:3000" //배포시 도메인 변경
       ) {
         const { accessToken, refreshToken, user } = event.data;
-        // 토큰 저장 등 필요한 처리 로직
-        console.log(accessToken);
-        console.log(refreshToken);
-        console.log(user);
 
-        //useAuthStore().setAuth(res.data);
-        useAuthStore().setAccessToken(accessToken);
-        useAuthStore().setRefreshToken(refreshToken);
-        //localStorage.setItem("tempAccess", __ID);
-        useUtil.setPageMove("/view/item");
-        useStore.menuInfo.menuIndex = "0";
-        useStore.menuInfo.menuId = "menu02";
-        useStore.menuInfo.pageRtName = "이벤트 관리";
-        useStore.menuInfo.pageStatus = null;
+        if (user?.JOIN === "1") {
+          useAuthStore().setTempData(user);
+          useUtil.setPageMove("/auth/join");
+        } else {
+          //useAuthStore().setAuth(res.data);
+
+          const result = {
+            refreshToken: refreshToken,
+            user: user,
+          };
+
+          //console.log(result);
+
+          //return;
+
+          useAuthStore().setTempData(result);
+          useAuthStore().setAccessToken(accessToken);
+          useAuthStore().setRefreshToken(refreshToken);
+          localStorage.setItem("tempAccess", result.user.NICK_NAME);
+          useUtil.setPageMove("/view/item");
+          useStore.menuInfo.menuIndex = "0";
+          useStore.menuInfo.menuId = "menu02";
+          useStore.menuInfo.pageRtName = "이벤트 관리";
+          useStore.menuInfo.pageStatus = null;
+        }
       }
     }
     window.addEventListener("message", handleMessage);
@@ -350,450 +384,33 @@
   watchEffect(() => {
     // 감시하고자 하는 데이터를 해당 블럭내에서 사용하면 호출된다.
     // getLang.value를 감시하는 상태
-    fnGetEnumCode(useLangStore().getLang);
-  });
-
-  $eventBus.off("SET_SUCCESS_POPUP");
-  $eventBus.on("SET_SUCCESS_POPUP", () => {
-    // 안내 팝업 확인 클릭 팝업 초기화처리
-    fnOtpPopClose("findId");
-    fnOtpPopClose("resetPw");
-  });
-
-  $eventBus.off("PASSWD_CHANGE");
-  $eventBus.on("PASSWD_CHANGE", () => {
-    fnPasswdChange();
-  });
-
-  $eventBus.off("INIT_PASSWORD");
-  $eventBus.on("INIT_PASSWORD", () => {
-    initPw.value.popYn = true;
+    //QfnGetEnumCode(useLangStore().getLang);
   });
 
-  $eventBus.off("SET_LOGIN");
-  $eventBus.on("SET_LOGIN", () => {
-    fnLogin();
-  });
+  // $eventBus.off("SET_SUCCESS_POPUP");
+  // $eventBus.on("SET_SUCCESS_POPUP", () => {
+  //   // 안내 팝업 확인 클릭 팝업 초기화처리
+  //   fnOtpPopClose("findId");
+  //   fnOtpPopClose("resetPw");
+  // });
+
+  // $eventBus.off("PASSWD_CHANGE");
+  // $eventBus.on("PASSWD_CHANGE", () => {
+  //   fnPasswdChange();
+  // });
+
+  // $eventBus.off("INIT_PASSWORD");
+  // $eventBus.on("INIT_PASSWORD", () => {
+  //   initPw.value.popYn = true;
+  // });
+
+  // $eventBus.off("SET_LOGIN");
+  // $eventBus.on("SET_LOGIN", () => {
+  //   fnLogin();
+  // });
   /************************
    *    Methods
    ************************/
-  // created
-  loginForm.value.btnTxtType = "S";
-  authPop1.value.btnTxtType = "S";
-  loginForm.value.btnTxt = i18n.t("login.authNumSend");
-  authPop1.value.btnTxt = i18n.t("common.sendAuthNumber");
-  findId.value.btnTxt = i18n.t("common.sendAuthNumber");
-  resetPw.value.btnTxt = i18n.t("common.sendAuthNumber");
-
-  initAuthPop1.value = _cloneDeep(authPop1.value);
-  initAuthPop2.value = _cloneDeep(authPop2.value);
-  initFindId.value = _cloneDeep(findId.value);
-  initResetPw.value = _cloneDeep(resetPw.value);
-  initInitPw.value = _cloneDeep(initPw.value);
-
-  /**
-   * @SCRIPT
-   * 다국어 기능 | 한글 영문 변경 이벤트
-   */
-  function fnLangChange() {
-    useLangStore().setLang(langType.value);
-  }
-
-  function fnGetEnumCode(lang) {
-    lang = useUtil.nvl(lang, "kr");
-    langType.value = lang;
-    let objEnum = useEnumCode.getEnumCode(lang);
-    listObj.value.langTypeList = objEnum.langType;
-    i18n.locale.value = lang;
-  }
-
-  /**
-   * @SCRIPT
-   * 라디오버튼 변경 이벤트 (버튼별 문구)
-   */
-  function fnChangeAuth() {
-    if (loginForm.value.authType === "GOOGLE") {
-      selectPlaceholder.value = i18n.t("login.googleOTPNum");
-    } else if (loginForm.value.authType === "EMAIL") {
-      selectPlaceholder.value = i18n.t("login.emailAuthNum");
-    } else {
-      selectPlaceholder.value = i18n.t("login.smsAuthNum");
-    }
-    loginForm.value.btnTxt = i18n.t("login.authNumSend");
-    loginForm.value.btnTxtType = "S";
-
-    if (!loginForm.value.validCheck.otp.otpNum) {
-      fnValidCheck("main_otpNum");
-    }
-  }
-
-  /**
-   * @SCRIPT
-   * 구글OTP 인증 버튼 클릭 이벤트
-   * @param {*} type
-   */
-  function fnAuthCheck(type) {
-    let issuer = ""; // 회사명
-    let account = ""; // 아이디
-    let otpUrl = ""; // 큐알코드 생성 URL
-    let _req = {
-      username: authPop1.value.userId,
-      password: btoa(authPop1.value.passwd),
-      mfaType: "SMS",
-      otpNum: authPop1.value.otpNum,
-    };
-
-    if (type === "optApply1") {
-      fnValidCheck("createOtp_userId");
-      fnValidCheck("createOtp_passwd");
-      if (authPop1.value.errorCheck) {
-        fnAuth("POPUP");
-      }
-    } else if (type === "optApply2") {
-      //OTP 인증 팝업2
-      useAxios()
-        .post(apiUrl.googleSecretKey, _req)
-        .then((res) => {
-          googleOtpSecretKey.value = res.data.data.secretKey;
-          // 시크릿 키를 이용한 큐알코드 생성
-          issuer = "[P5G]" + authPop1.value.businessName;
-          account = authPop1.value.userId;
-          otpUrl =
-            "otpauth://totp/" +
-            encodeURIComponent(issuer + ":" + account).replace(/\+/g, "%20") +
-            "?secret=" +
-            encodeURIComponent(googleOtpSecretKey.value).replace(/\+/g, "%20") +
-            "&issuer=" +
-            encodeURIComponent(issuer).replace(/\+/g, "%20");
-          fnCreateQrCode(otpUrl);
-
-          $toast.success("인증처리가 완료되었습니다.");
-          authPop1.value.applyBtn = false;
-          authPop1.value.agreeChk1 = true;
-          authPop1.value.succOtpYn = true;
-          $log.debug("[login][fnAuthCheck][success]");
-        })
-        .catch((error) => {
-          $log.debug("[login][fnAuthCheck][error]");
-          let errorData = error.response.data;
-          errorData.type = "fnAuthCheck";
-          fnLoginFail(errorData);
-        })
-        .finally(() => {
-          $log.debug("[login][fnAuthCheck][finished]");
-        });
-    } else if (type === "optApply2Yn") {
-      authPop1.value.popYn = false;
-      authPop2.value.popYn = true;
-    } else if (type === "findId") {
-      //fnValidCheck('findId_tenantName')
-      fnValidCheck("findId_email");
-      if (findId.value.validCheck.inputErrorCheck) {
-        fnIdPwCheck(type);
-      }
-    } else if (type === "resetPw") {
-      fnValidCheck("resetPw_userId");
-      fnValidCheck("resetPw_email");
-      if (resetPw.value.validCheck.inputErrorCheck) {
-        fnIdPwCheck(type);
-      }
-    } else if (type === "createOtp_otpNum") {
-      // 구글OTP등록화면에서 인증번호 받기
-      fnAuthSend(authPop1.value.btnTxtType, "createOtp_otpNum");
-    } else {
-      fnValidCheck("main_userId");
-      fnValidCheck("main_passwd");
-      if (loginForm.value.validCheck.inputErrorCheck) {
-        fnAuth(type);
-      }
-    }
-  }
-
-  /**
-   * @SCRIPT
-   * 큐알코드 생성
-   * @param {*} otpUrl
-   */
-  async function fnCreateQrCode(otpUrl) {
-    googleOtpQrCode.value = await QRCode.toDataURL(otpUrl);
-  }
-
-  /**
-   * @SCRIPT
-   * 로그인 실패관련 토스트 & confirm 처리
-   */
-  function fnLoginFail(dataObj) {
-    let errorMessage = "";
-    let type = dataObj.type;
-    if (dataObj.code === "2001" || dataObj.code === "2002") {
-      let valieTxt = "";
-      if (!useUtil.isNull(dataObj.reason)) {
-        if (dataObj.reason < "4") {
-          valieTxt += i18n.t("login.valid.isNullPw");
-        } else {
-          // 4회 이상 비밀번호 실패
-          fnLoginFailConfirm(dataObj);
-        }
-      } else {
-        valieTxt += i18n.t("login.valid.isNullId");
-      }
-      console.log("비밀번호 초기화 팝업:::" + resetPw.value.popYn);
-      console.log("아이디찾기 팝업:::" + findId.value.popYn);
-      console.log("OTP생성 팝업:::" + authPop1.value.popYn);
-      if (resetPw.value.popYn) {
-        resetPw.value.validCheck.inputErrorCheck = false;
-        resetPw.value.validCheck.inputValidTxt = valieTxt;
-      } else if (findId.value.popYn) {
-        findId.value.validCheck.inputErrorCheck = false;
-        findId.value.validCheck.inputValidTxt = valieTxt;
-      } else if (authPop1.value.popYn) {
-        authPop1.value.errorCheck = false;
-        authPop1.value.validTxt = valieTxt;
-      } else {
-        loginForm.value.validCheck.inputErrorCheck = false;
-        loginForm.value.validCheck.inputValidTxt = valieTxt;
-      }
-    } else if (dataObj.code === "2003") {
-      let otpTxt = "";
-      if (loginForm.value.authType === "GOOGLE") {
-        otpTxt += i18n.t("login.valid.isNullOtp");
-      } else if (loginForm.value.authType === "EMAIL") {
-        otpTxt += i18n.t("login.valid.isNullEmail");
-      } else {
-        otpTxt += i18n.t("login.valid.isNullSms");
-      }
-      if (resetPw.value.popYn) {
-        resetPw.value.validCheck.otp.otpNum = false;
-        resetPw.value.validCheck.otpValidTxt = i18n.t("login.valid.isNullEmail");
-      } else if (findId.value.popYn) {
-        findId.value.validCheck.otp.otpNum = false;
-        findId.value.validCheck.otpValidTxt = i18n.t("login.valid.isNullEmail");
-      } else if (authPop1.value.popYn) {
-        authPop1.value.validOtpKey = false;
-        authPop1.value.validOtpTxt = i18n.t("login.valid.isNullSms");
-      } else {
-        loginForm.value.validCheck.otp.otpNum = false;
-        loginForm.value.validCheck.otpValidTxt = otpTxt;
-      }
-    } else if (
-      dataObj.code === "2004" ||
-      dataObj.code === "2005" ||
-      dataObj.code === "2006" ||
-      dataObj.code === "2007" ||
-      dataObj.code === "2010"
-    ) {
-      // 2004: 접속허용IP아님 , 2005: 사업자 접속불가 상태, 2006: 사업자 계약 만료, 2007: 접속 계정 수 초과, 2010: 계정 잠김 (비밀번호 틀림 N 회) 5회 이상 비밀번호 실패
-      fnLoginFailConfirm(dataObj);
-    }
-    if (!useUtil.isNull(errorMessage)) {
-      // 토스트 함수 (success, info, error, warn, dark)
-      if (type === "findId" || type === "resetPw")
-        errorMessage += i18n.t("login.failMessage.2001");
-      else errorMessage += i18n.t("login.valid.isNull");
-      nextTick().then(() => {
-        $toast.error(errorMessage);
-      });
-    }
-  }
-
-  /**
-   * @SCRIPT
-   * 로그인 실패관련 토스트 & confirm 처리
-   */
-  function fnLoginFailConfirm(dataObj) {
-    let confirmMessage = "";
-    if (dataObj.code === "2002") confirmMessage = i18n.t("login.failMessage.2002");
-    else if (dataObj.code === "2004") confirmMessage = i18n.t("login.failMessage.2004");
-    else if (dataObj.code === "2005") confirmMessage = i18n.t("login.failMessage.2005");
-    else if (dataObj.code === "2006") confirmMessage = i18n.t("login.failMessage.2006");
-    else if (dataObj.code === "2007") confirmMessage = i18n.t("login.failMessage.2007");
-    else if (dataObj.code === "2010") confirmMessage = i18n.t("login.failMessage.2010");
-
-    let param = {
-      id: pageId,
-      title: i18n.t("common.popTitle"),
-      content: confirmMessage,
-      yes: {
-        text: i18n.t("common.confirm"),
-        isProc: true,
-        event: "",
-        param: {},
-      },
-    };
-    $eventBus.emit("OPEN_CONFIRM_POP_UP", param);
-  }
-
-  /**
-   * @SCRIPT
-   * 아이디 저장 체크 이벤트
-   */
-  function fnSaveId() {
-    if (checkbox.value) {
-      // 체크 시 저장
-      localStorage.setItem("saveId", loginForm.value.userId);
-    } else {
-      // 미체크 시 삭제
-      localStorage.removeItem("saveId");
-    }
-  }
-
-  /**
-   * @API
-   * 아이디 찾기에서 사업자명 & 이메일 주소 체크 API
-   * 비밀번호 초기화에서 사용자계정 & 이메일 주소 체크 API
-   */
-  function fnIdPwCheck(type) {
-    let _req = {};
-    if (type === "findId") {
-      //_req.tenantName = findId.value.tenantName,
-      _req.email = findId.value.email;
-    } else {
-      (_req.accountId = resetPw.value.userId), (_req.email = resetPw.value.email);
-    }
-
-    useAxios()
-      .post(apiUrl.findCheck, _req)
-      .then((res) => {
-        if (type === "findId") {
-          findId.value.btnTxt = i18n.t("common.sendReAuthNumber");
-        } else {
-          resetPw.value.btnTxt = i18n.t("common.sendReAuthNumber");
-        }
-
-        $toast.success(i18n.t("login.sendEmail"));
-        $log.debug("[login][fnIdPwCheck][success]");
-      })
-      .catch((error) => {
-        let errorData = error.response.data;
-        errorData.type = type;
-        fnLoginFail(errorData);
-        $log.debug("[login][fnIdPwCheck][error]");
-      })
-      .finally(() => {
-        $log.debug("[login][fnIdPwCheck][finished]");
-      });
-  }
-
-  /**
-   * @API
-   * 가입된 아이디 비밀번호 체크 API
-   */
-  function fnAuth(type) {
-    let _req = {};
-
-    if (type === "POPUP") {
-      _req.username = authPop1.value.userId;
-      _req.password = btoa(authPop1.value.passwd);
-    } else {
-      _req.username = loginForm.value.userId;
-      _req.password = btoa(loginForm.value.passwd);
-    }
-    // 아이디&비밀번호 validation체크 정상일 경우 아이디 비밀번호를 체크 하는 API를 진행한다.
-    useAxios()
-      .post(apiUrl.idPwCheck, _req)
-      .then((res) => {
-        if (type === "GOOGLE") {
-          fnLogin();
-        } else if (type === "POPUP") {
-          // if(useUtil.isNull(res.data.data.tenantName)) {
-          //   authPop1.value.businessName = ''
-          // } else {
-          //   authPop1.value.businessName = res.data.data.tenantName
-          // }
-
-          // 아이디 비밀번호 입력 영역 비활성화
-          authPop1.value.certifyYN = true;
-          //authPop1.value.agreeChk1 = true
-        } else {
-          // 아이디&비밀번호가 존재하여 이메일 발송을 진행합니다.
-          fnAuthSend(loginForm.value.btnTxtType, "loginForm");
-        }
-        $log.debug("[login][fnAuth][success]");
-      })
-      .catch((error) => {
-        let errorData = error.response.data;
-        errorData.type = type;
-        fnLoginFail(errorData);
-        $log.debug("[login][fnAuth][error]");
-      })
-      .finally(() => {
-        $log.debug("[login][fnAuth][finished]");
-      });
-  }
-
-  /**
-   * @API
-   * 가입된 아이디 비밀번호 체크가 정상 일 경우 인증번호 발송
-   * 이메일(EMAIL) & 문자(SMS)
-   */
-  function fnAuthSend(type, form) {
-    let _req = {};
-    if (form === "loginForm") {
-      (_req.username = loginForm.value.userId),
-        (_req.password = btoa(loginForm.value.passwd)),
-        (_req.mfaType = loginForm.value.authType);
-    } else {
-      (_req.username = authPop1.value.userId),
-        (_req.password = btoa(authPop1.value.passwd)),
-        (_req.mfaType = "SMS");
-    }
-    useAxios()
-      .post(apiUrl.otpSend, _req)
-      .then((res) => {
-        if (form === "loginForm") {
-          loginForm.value.btnTxt = i18n.t("login.authNumReSend");
-          loginForm.value.btnTxtType = "R";
-        } else {
-          authPop1.value.btnTxt = i18n.t("login.authNumReSend");
-          authPop1.value.btnTxtType = "R";
-        }
-
-        if (type === "S") {
-          if (form === "loginForm") {
-            if (loginForm.value.authType === "EMAIL") {
-              $toast.success(i18n.t("login.sendEmail"));
-            } else {
-              $toast.success(i18n.t("login.sendSms"));
-            }
-          } else {
-            $toast.success(i18n.t("login.sendSms"));
-          }
-        } else {
-          if (form === "loginForm") {
-            if (loginForm.value.authType === "EMAIL") {
-              $toast.success(i18n.t("login.sendReEmail"));
-            } else {
-              $toast.success(i18n.t("login.sendReSms"));
-            }
-          } else {
-            $toast.success(i18n.t("login.sendReSms"));
-          }
-        }
-        $log.debug("[login][fnAuthSend][success]");
-      })
-      .catch((error) => {
-        $log.debug("[login][fnAuthSend][error]");
-        // 에러 메시지 체크 팝업으로 변경
-        let param = {
-          id: pageId,
-          title: i18n.t("common.popTitle"),
-          content: i18n.t("login.sendFail"),
-          yes: {
-            text: i18n.t("common.confirm"),
-            isProc: true,
-            event: "",
-            param: {},
-          },
-        };
-        $eventBus.emit("OPEN_CONFIRM_POP_UP", param);
-        // let errorMessage = i18n.t('login.sendFail')
-        // errorMessage += error.response.data.message
-        // $toast.error(errorMessage)
-      })
-      .finally(() => {
-        $log.debug("[login][fnAuthSend][finished]");
-      });
-  }
 
   const fnLoginSet = (__MSG) => {
     let param = {
@@ -823,7 +440,7 @@
     const responseType = "code"; // 또는 'code' (백엔드 연동 시)
     const state = Math.random().toString(36).substring(2);
 
-    const googleAuthUrl = `https://accounts.google.com/o/oauth2/v2/auth?client_id=${clientId}&redirect_uri=${encodeURIComponent(
+    const googleAuthUrl = `https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&client_id=${clientId}&redirect_uri=${encodeURIComponent(
       redirectUri
     )}&response_type=${responseType}&scope=${encodeURIComponent(scope)}&state=${state}`;
 
@@ -896,474 +513,4 @@
     //     $log.debug("[login][fnLogin][finished]");
     //   });
   }
-
-  /**
-   * @API
-   * 최종 로그인 전 점검공지에 대한 정보를 가져온다.
-   */
-  function fnServiceModeCheck() {
-    useAxios()
-      .get(useApi.getServiceMode)
-      .then((res) => {
-        $log.debug("[login][fnServiceModeCheck][success]");
-        let data = res.data.data;
-        systemInfo.value.mode = data.mode;
-        fnMyInfo();
-      })
-      .catch((error) => {
-        $log.debug("[login][fnServiceModeCheck][error]");
-        useErrorHandler().fnSetCommErrorHandle(error);
-      })
-      .finally(() => {
-        $log.debug("[login][fnServiceModeCheck][finished]");
-      });
-  }
-  /**
-   * @API
-   * 최종 로그인 버튼 클릭 후 성공 시 토큰값을 통해 개인정보 API 호출
-   */
-  function fnMyInfo() {
-    useAxios()
-      .get(apiUrl.myInfo)
-      .then((res) => {
-        let dataObj = {};
-        dataObj = res.data.data;
-        dataObj.accessToken = useAuthStore().getAccessToken;
-        dataObj.refreshToken = useAuthStore().getRefreshToken;
-        useAuthStore().setServiceMode(systemInfo.value.mode);
-
-        useAuthStore().setAuth(dataObj);
-        // 아이디 저장 여부 체크
-        fnSaveId();
-        let accountValue = useAuthStore().getAccountRole.charAt(0).toUpperCase();
-        // 첫화면 redirect_page URL로 설정
-        // 초기 비밀번호 사용
-        if (useAuthStore().getFirstLoginYn === "Y") {
-          // 최초로그인
-          initPw.value.popYn = true;
-        } else if (useAuthStore().getPwExpiredYN === "Y") {
-          // 비밀번호 3개월 만료
-          let param = {
-            id: pageId,
-            title: i18n.t("common.popTitle"),
-            content: i18n.t("login.failMessage.2009"),
-            yes: {
-              text: i18n.t("common.confirm"),
-              isProc: true,
-              event: "INIT_PASSWORD", // 확인 클릭 시 비밀번호 변경 팝업 활성화
-              param: {},
-            },
-            no: {
-              text: i18n.t("common.skip"),
-              isProc: true,
-              event: "SET_LOGIN", // 건너뛰기 클릭 시 로그인 처리
-              param: {},
-            },
-          };
-          $eventBus.emit("OPEN_CONFIRM_POP_UP", param);
-        } else if (useAuthStore().getTermsArgYN === "N") {
-          // 필수약관동의여부
-          isShowAgrNPop.value = true;
-          nextTick().then(() => {
-            isAgrNPop.value = true;
-          });
-        } else {
-          if (systemInfo.value.mode === "INACTIVE") {
-            // 점검모드일 경우 점검모드 페이지로 이동
-            if (accountValue === "S") {
-              useUtil.setPageMove("/view/home/dashboard");
-            } else {
-              useUtil.setPageMove("/view/home/serviceMode");
-            }
-          } else {
-            if (accountValue === "A" || accountValue === "S") {
-              useUtil.setPageMove("/view/home/dashboard");
-            } else {
-              useUtil.setPageMove("/view/home/tenantDashboard");
-            }
-          }
-        }
-        $log.debug("[login][fnMyInfo][success]");
-      })
-      .catch((error) => {
-        $log.debug("[login][fnMyInfo][error]");
-        useErrorHandler().fnSetCommErrorHandle(error);
-      })
-      .finally(() => {
-        $log.debug("[login][fnMyInfo][finished]");
-      });
-  }
-
-  /**
-   * @API
-   * 최초 비밀번호 변경 API 호출
-   */
-  function fnPasswdChange() {
-    let _req = {
-      newPassword: btoa(initPw.value.passwd2),
-    };
-
-    useAxios()
-      .post(apiUrl.myInfoUpdate, _req)
-      .then((res) => {
-        localStorage.removeItem("authStore");
-        // 세션 초기화 및 로그인 화면 이동
-        useUtil.setPageMove("/");
-        $log.debug("[login][fnPasswdChange][success]");
-      })
-      .catch((error) => {
-        $log.debug("[login][fnPasswdChange][error]");
-        let errorData = error.response.data;
-        errorData.type = "fnPasswdChange";
-        fnLoginFail(errorData);
-      })
-      .finally(() => {
-        $log.debug("[login][fnPasswdChange][finished]");
-      });
-  }
-
-  /**
-   * @API
-   * 로그인 FOOTER 약관 조회 API
-   */
-  function fnPrivacy(type) {
-    let _req = {
-      termsType: useUtil.nvl(type, null),
-    };
-    useAxios()
-      .get(apiUrl.loginTerms, { params: _req })
-      .then((res) => {
-        let dataObj = res.data.data;
-        privacyDetail.value.kr.title = dataObj.termsTitle;
-        privacyDetail.value.kr.contents = dataObj.termsCont;
-
-        privacyDetail.value.en.title = dataObj.termsTitleEn;
-        privacyDetail.value.en.contents = dataObj.termsContEn;
-        privacyPop.value = true;
-      })
-      .catch((error) => {
-        $log.debug("[login][fnPrivacy][error]");
-        useErrorHandler().fnSetCommErrorHandle(error, fnPrivacy);
-      })
-      .finally(() => {
-        $log.debug("[login][fnPrivacy][finished]");
-      });
-  }
-  /**
-   * @SCRIPT
-   * 아이디 & 비밀번호 & otp 값의 유효성 검사 체크 및 로그인 버튼 활성화 이벤트
-   */
-  function fnValidCheck(input) {
-    if (_includes(input, "main_")) {
-      let commonValidCheck = {
-        inputCheck: false,
-        otpCheck: false,
-      };
-      if (input === "main_userId") {
-        if (
-          useUtil.isNull(loginForm.value.userId) ||
-          !/^[a-zA-Z0-9._-]{1,20}$/.test(loginForm.value.userId)
-        ) {
-          loginForm.value.validCheck.input.userId = false;
-          loginForm.value.validCheck.inputValidTxt = i18n.t("login.valid.isNull");
-        } else {
-          loginForm.value.validCheck.input.userId = true;
-          if (!useUtil.isNull(loginForm.value.passwd)) {
-            fnValidCheck("main_passwd");
-          }
-        }
-      } else if (input === "main_passwd") {
-        if (
-          useUtil.isNull(loginForm.value.passwd) ||
-          !/^(?=.*[a-zA-Z])(?=.*[!@#$%^*+=-])(?=.*[0-9]).{8,30}$/i.test(
-            loginForm.value.passwd
-          )
-        ) {
-          //if(useUtil.isNull(loginForm.value.passwd)) {
-          loginForm.value.validCheck.input.passwd = false;
-          loginForm.value.validCheck.inputValidTxt = i18n.t("login.valid.isNull");
-        } else {
-          loginForm.value.validCheck.input.passwd = true;
-        }
-      } else if (input === "main_otpNum") {
-        loginForm.value.otpNum = useValid.p5gNumCheck(loginForm.value.otpNum, "otp");
-
-        if (
-          useUtil.isNull(loginForm.value.otpNum) ||
-          loginForm.value.otpNum.length <= 5
-        ) {
-          loginForm.value.validCheck.otp.otpNum = false;
-          if (loginForm.value.authType === "GOOGLE") {
-            loginForm.value.validCheck.otpValidTxt = i18n.t("login.valid.isNullOtp");
-          } else if (loginForm.value.authType === "EMAIL") {
-            loginForm.value.validCheck.otpValidTxt = i18n.t("login.valid.isNullEmail");
-          } else {
-            loginForm.value.validCheck.otpValidTxt = i18n.t("login.valid.isNullSms");
-          }
-        } else {
-          loginForm.value.validCheck.otp.otpNum = true;
-        }
-      }
-      loginForm.value.validCheck.inputErrorCheck = _every(
-        loginForm.value.validCheck.input,
-        (value) => value === true
-      );
-      // 전체 항목에 대한 validation이 정상일 경우 login버튼 활성화
-      if (
-        !useUtil.isNull(loginForm.value.userId) &&
-        !useUtil.isNull(loginForm.value.passwd) &&
-        !useUtil.isNull(loginForm.value.otpNum)
-      ) {
-        commonValidCheck.inputCheck = _every(
-          loginForm.value.validCheck.input,
-          (value) => value === true
-        );
-        commonValidCheck.otpCheck = _every(
-          loginForm.value.validCheck.otp,
-          (value) => value === true
-        );
-      }
-      loginForm.value.validCheck.loginValidCheck = _every(
-        commonValidCheck,
-        (value) => value === true
-      );
-    } else if (_includes(input, "createOtp_")) {
-      if (input === "createOtp_userId") {
-        if (
-          useUtil.isNull(authPop1.value.userId) ||
-          !/^[a-zA-Z0-9._-]{1,20}$/.test(authPop1.value.userId)
-        ) {
-          authPop1.value.validCheck.userId = false;
-          authPop1.value.validTxt = i18n.t("login.valid.isNull");
-        } else {
-          authPop1.value.validCheck.userId = true;
-          if (!useUtil.isNull(authPop1.value.passwd)) {
-            fnValidCheck("createOtp_passwd");
-          }
-        }
-      } else if (input === "createOtp_passwd") {
-        if (
-          useUtil.isNull(authPop1.value.passwd) ||
-          !/^(?=.*[a-zA-Z])(?=.*[!@#$%^*+=-])(?=.*[0-9]).{8,30}$/i.test(
-            authPop1.value.passwd
-          )
-        ) {
-          //if(useUtil.isNull(authPop1.value.passwd)) {
-          authPop1.value.validCheck.passwd = false;
-          authPop1.value.validTxt = i18n.t("login.valid.isNull");
-        } else {
-          authPop1.value.validCheck.passwd = true;
-        }
-      } else if (input === "createOtp_otpNum1") {
-        authPop1.value.otpNum = useValid.p5gNumCheck(authPop1.value.otpNum, "otp");
-        if (useUtil.isNull(authPop1.value.otpNum) || authPop1.value.otpNum.length <= 5) {
-          authPop1.value.validOtpKey = false;
-          authPop1.value.errorCheck = false;
-          authPop1.value.validOtpTxt = i18n.t("login.valid.isNullSms");
-        } else {
-          authPop1.value.validOtpKey = true;
-          authPop1.value.errorCheck = true;
-          authPop1.value.applyBtn = true;
-        }
-      } else if (input === "createOtp_otpNum") {
-        authPop2.value.otpNum = useValid.p5gNumCheck(authPop2.value.otpNum, "otp");
-
-        if (useUtil.isNull(authPop2.value.otpNum) || authPop2.value.otpNum.length <= 5) {
-          authPop2.value.validOtpKey = false;
-          authPop2.value.errorCheck = false;
-          if (loginForm.value.authType === "GOOGLE") {
-            authPop2.value.validOtpTxt = i18n.t("login.valid.isNullOtp");
-          } else if (loginForm.value.authType === "EMAIL") {
-            authPop2.value.validOtpTxt = i18n.t("login.valid.isNullEmail");
-          } else {
-            authPop2.value.validOtpTxt = i18n.t("login.valid.isNullSms");
-          }
-        } else {
-          authPop2.value.validOtpKey = true;
-          authPop2.value.errorCheck = true;
-        }
-      }
-      authPop1.value.errorCheck = _every(
-        authPop1.value.validCheck,
-        (value) => value === true
-      );
-    } else if (_includes(input, "findId_")) {
-      let validAllCheck = {
-        inputCheck: false,
-        otpCheck: false,
-      };
-      // if(input === 'findId_tenantName') {
-      //   if(useUtil.isNull(findId.value.tenantName)) {
-      //     findId.value.validCheck.input.tenantName = false
-      //     findId.value.validCheck.inputValidTxt = i18n.t('login.findId.valid.isNullTenantName')
-      //   } else {
-      //     findId.value.validCheck.input.tenantName = true
-      //     if(!useUtil.isNull(findId.value.email)) {
-      //       fnValidCheck('findId_email')
-      //     }
-      //   }
-      // } else
-      if (input === "findId_email") {
-        if (useUtil.isNull(findId.value.email)) {
-          findId.value.validCheck.input.email = false;
-          findId.value.validCheck.inputValidTxt = i18n.t(
-            "login.findId.valid.isNullEmail"
-          );
-        } else if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(findId.value.email)) {
-          findId.value.validCheck.input.email = false;
-          findId.value.validCheck.inputValidTxt = i18n.t(
-            "login.findId.valid.isTypeEmail"
-          );
-        } else {
-          findId.value.validCheck.input.email = true;
-        }
-      } else if (input === "findId_otpNum") {
-        findId.value.otpNum = useValid.p5gNumCheck(findId.value.otpNum, "otp");
-
-        if (useUtil.isNull(findId.value.otpNum) || findId.value.otpNum.length <= 5) {
-          findId.value.validCheck.otp.otpNum = false;
-          findId.value.validCheck.otpValidTxt = i18n.t("login.findId.valid.isNullOtp");
-        } else {
-          findId.value.validCheck.otp.otpNum = true;
-        }
-      }
-      // tenantName & email validation check
-      findId.value.validCheck.inputErrorCheck = _every(
-        findId.value.validCheck.input,
-        (value) => value === true
-      );
-      //!useUtil.isNull(findId.value.tenantName) &&
-      if (!useUtil.isNull(findId.value.email) && !useUtil.isNull(findId.value.otpNum)) {
-        validAllCheck.inputCheck = findId.value.validCheck.inputErrorCheck;
-        validAllCheck.otpCheck = findId.value.validCheck.otp.otpNum;
-      }
-      findId.value.validCheck.findIdValidCheck = _every(
-        validAllCheck,
-        (value) => value === true
-      );
-    } else if (_includes(input, "resetPw_")) {
-      let validAllCheck = {
-        inputCheck: false,
-        otpCheck: false,
-      };
-
-      if (input === "resetPw_userId") {
-        if (useUtil.isNull(resetPw.value.userId)) {
-          resetPw.value.validCheck.input.userId = false;
-          resetPw.value.validCheck.inputValidTxt = i18n.t(
-            "login.resetPasswd.valid.isNullUserId"
-          );
-        } else {
-          resetPw.value.validCheck.input.userId = true;
-          if (!useUtil.isNull(resetPw.value.email)) {
-            fnValidCheck("resetPw_email");
-          }
-        }
-      } else if (input === "resetPw_email") {
-        if (useUtil.isNull(resetPw.value.email)) {
-          resetPw.value.validCheck.input.email = false;
-          resetPw.value.validCheck.inputValidTxt = i18n.t(
-            "login.resetPasswd.valid.isNullEmail"
-          );
-        } else if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(resetPw.value.email)) {
-          resetPw.value.validCheck.input.email = false;
-          resetPw.value.validCheck.inputValidTxt = i18n.t(
-            "login.resetPasswd.valid.isTypeEmail"
-          );
-        } else {
-          resetPw.value.validCheck.input.email = true;
-        }
-      } else if (input === "resetPw_otpNum") {
-        resetPw.value.otpNum = useValid.p5gNumCheck(resetPw.value.otpNum, "otp");
-
-        if (useUtil.isNull(resetPw.value.otpNum) || resetPw.value.otpNum.length <= 5) {
-          resetPw.value.validCheck.otp.otpNum = false;
-          resetPw.value.validCheck.otpValidTxt = i18n.t(
-            "login.resetPasswd.valid.isNullOtp"
-          );
-        } else {
-          resetPw.value.validCheck.otp.otpNum = true;
-        }
-      }
-      // tenantName & email validation check
-      resetPw.value.validCheck.inputErrorCheck = _every(
-        resetPw.value.validCheck.input,
-        (value) => value === true
-      );
-
-      if (
-        !useUtil.isNull(resetPw.value.userId) &&
-        !useUtil.isNull(resetPw.value.email) &&
-        !useUtil.isNull(resetPw.value.otpNum)
-      ) {
-        validAllCheck.inputCheck = resetPw.value.validCheck.inputErrorCheck;
-        validAllCheck.otpCheck = resetPw.value.validCheck.otp.otpNum;
-      }
-      resetPw.value.validCheck.resetPwValidCheck = _every(
-        validAllCheck,
-        (value) => value === true
-      );
-    } else {
-      if (input === "initPw_passwd") {
-        let digits1 = useAuthStore().getAuth.phoneNumber.replace(/\D/g, "");
-        let digits2 = initPw.value.passwd.replace(/\D/g, "");
-        let lastEightDigits1 = digits1.slice(-8);
-        let lastEightDigits2 = digits2.slice(-8);
-
-        if (useUtil.isNull(initPw.value.passwd)) {
-          initPw.value.validCheck.passwd = false;
-          initPw.value.errorTxt = i18n.t("login.valid.isNullNewPassword");
-        } else if (_includes(initPw.value.passwd, useAuthStore().getAuth.accountId)) {
-          // 아이디는 비밀번호로 사용할 수 없습니다.
-          initPw.value.validCheck.passwd = false;
-          initPw.value.errorTxt = i18n.t(
-            "common.header.myInfoUpdateModal.valid.includeId"
-          );
-        } else if (lastEightDigits1 === lastEightDigits2) {
-          // 연락처와 유사한 비밀번호는 사용할 수 없습니다.
-          initPw.value.validCheck.passwd = false;
-          initPw.value.errorTxt = i18n.t(
-            "common.header.myInfoUpdateModal.valid.includePhone"
-          );
-        } else if (/(.)\1{2,}/.test(initPw.value.passwd)) {
-          // 3자리 이상 연속 숫자, 문자는 사용 불가합니다.
-          initPw.value.validCheck.passwd = false;
-          initPw.value.errorTxt = i18n.t(
-            "common.header.myInfoUpdateModal.valid.continuousUse"
-          );
-        } else if (
-          !/^(?=.*[a-zA-Z])(?=.*[!@#$%^*+=-])(?=.*[0-9]).{8,30}$/i.test(
-            initPw.value.passwd
-          )
-        ) {
-          // 비밀번호는 문자,숫자,특수문자 조합 8~30자리로입력
-          initPw.value.validCheck.passwd = false;
-          initPw.value.errorTxt = i18n.t(
-            "common.header.myInfoUpdateModal.valid.validPassword"
-          );
-        } else {
-          initPw.value.validCheck.passwd = true;
-          if (!useUtil.isNull(initPw.value.passwd2)) {
-            fnValidCheck("initPw_passwd2");
-          }
-        }
-      } else {
-        if (initPw.value.passwd != initPw.value.passwd2) {
-          // 신규비밀번호가 일치 하지 않습니다.
-          initPw.value.validCheck.passwd2 = false;
-          initPw.value.errorTxt = i18n.t(
-            "common.header.myInfoUpdateModal.valid.missmatchPassword"
-          );
-        } else {
-          initPw.value.validCheck.passwd2 = true;
-        }
-      }
-      if (!useUtil.isNull(initPw.value.passwd) && !useUtil.isNull(initPw.value.passwd2)) {
-        initPw.value.passwdCheck = _every(
-          initPw.value.validCheck,
-          (value) => value === true
-        );
-      }
-    }
-  }
 </script>

+ 8 - 2
stores/auth.js

@@ -9,6 +9,7 @@ export const useAuthStore = defineStore('authStore', () => {
     companyId: '',        // 아이디
     accessToken: '',      // 토큰
     refreshToken: '',     // 갱신토큰   
+    snsTempData : '', // sns 임시데이터
   })
 
                               // 전체 조회
@@ -21,6 +22,7 @@ export const useAuthStore = defineStore('authStore', () => {
   const getUserPhone = computed(() => auth.value.phone)             // 관리자 핸드폰 조회
   const getAccessToken = computed(() => auth.value.accessToken)         // 토큰 조회
   const getRefreshToken = computed(() => auth.value.refreshToken)       // 리프레시토큰 조회
+  const getSnsTempData = computed(() => auth.value.snsTempData)       // sns 임시데이터 조회
        // 점검공지
 
   function setAuth(payload){
@@ -32,9 +34,13 @@ export const useAuthStore = defineStore('authStore', () => {
     auth.value.companyName = payload.user.COMP_NAME
     auth.value.phone = payload.user.PHONE
     auth.value.accessToken = payload.accessToken
-    auth.value.refreshToken = payload.refreshToken    
+    auth.value.refreshToken = payload.refreshToken        
   }
 
+  function setTempData(payload){
+    auth.value.snsTempData = payload
+  }
+  
   function setAccessToken(token){
     auth.value.accessToken = token
   }
@@ -53,6 +59,6 @@ export const useAuthStore = defineStore('authStore', () => {
     localStorage.removeItem('authStore');
   }
 
-  return { auth, getCompanyId, getAccessToken, getRefreshToken, setAuth, setAccessToken, setRefreshToken, setLogout, getSeq, getUserId, getUserName, getUserEmail, getCompanyName, getUserPhone  }
+  return { auth, getCompanyId, getSnsTempData, getAccessToken, getRefreshToken, setAuth, setTempData, setAccessToken, setRefreshToken, setLogout, getSeq, getUserId, getUserName, getUserEmail, getCompanyName, getUserPhone  }
 }, {persist: { storage: persistedState.localStorage}})