|
@@ -72,6 +72,9 @@
|
|
|
>로그인</v-btn
|
|
>로그인</v-btn
|
|
|
>
|
|
>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <div class="short--login--wrap">
|
|
|
|
|
+ <v-btn @click="onGoogleLogin">구글 로그인</v-btn>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
@@ -92,8 +95,8 @@
|
|
|
//import PrivacyPop from "@/components/login/privacyPop.vue";
|
|
//import PrivacyPop from "@/components/login/privacyPop.vue";
|
|
|
//import AgrNPop from "@/components/terms/agreeNListPop.vue";
|
|
//import AgrNPop from "@/components/terms/agreeNListPop.vue";
|
|
|
import apiUrl from "@/composables/useApi";
|
|
import apiUrl from "@/composables/useApi";
|
|
|
-import QRCode from "qrcode";
|
|
|
|
|
-import { useI18n } from "vue-i18n";
|
|
|
|
|
|
|
+ import QRCode from "qrcode";
|
|
|
|
|
+ import { useI18n } from "vue-i18n";
|
|
|
|
|
|
|
|
/************************
|
|
/************************
|
|
|
* layout setting
|
|
* layout setting
|
|
@@ -795,6 +798,23 @@ import { useI18n } from "vue-i18n";
|
|
|
};
|
|
};
|
|
|
$eventBus.emit("OPEN_CONFIRM_POP_UP", param);
|
|
$eventBus.emit("OPEN_CONFIRM_POP_UP", param);
|
|
|
};
|
|
};
|
|
|
|
|
+
|
|
|
|
|
+ // 구글 로그인 버튼 클릭 시 호출
|
|
|
|
|
+ function onGoogleLogin() {
|
|
|
|
|
+ const clientId =
|
|
|
|
|
+ "373780605211-diojebh7mug45urv9rnqdil6n0b1ogge.apps.googleusercontent.com"; // 실제 클라이언트 ID로 교체
|
|
|
|
|
+ const redirectUri = "https://shopdeli.mycafe24.com/auth/callback"; // 실제 리디렉션 URI로 교체
|
|
|
|
|
+ const scope = "openid email profile";
|
|
|
|
|
+ const responseType = "token"; // 또는 '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(
|
|
|
|
|
+ redirectUri
|
|
|
|
|
+ )}&response_type=${responseType}&scope=${encodeURIComponent(scope)}&state=${state}`;
|
|
|
|
|
+
|
|
|
|
|
+ window.location.href = googleAuthUrl;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* @API
|
|
* @API
|
|
|
* 최종 로그인 버튼 클릭 시 API
|
|
* 최종 로그인 버튼 클릭 시 API
|