From 05cf57df861269f2a53067fbd73ec73d3402e2bb Mon Sep 17 00:00:00 2001 From: imnyang Date: Sat, 5 Jul 2025 13:23:12 +0900 Subject: [PATCH] =?UTF-8?q?=ED=81=B4=EB=9D=BC=EC=9D=B4=EC=96=B8=ED=8A=B8?= =?UTF-8?q?=20=EC=8B=9C=ED=81=AC=EB=A6=BF=EC=9D=84=20=ED=99=98=EA=B2=BD=20?= =?UTF-8?q?=EB=B3=80=EC=88=98=EB=A1=9C=20=EB=B3=80=EA=B2=BD=ED=95=98?= =?UTF-8?q?=EA=B3=A0=20.env.example=20=ED=8C=8C=EC=9D=BC=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.example | 1 + server.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..735e28f --- /dev/null +++ b/.env.example @@ -0,0 +1 @@ +CLIENT_SECRET= \ No newline at end of file diff --git a/server.js b/server.js index 3656424..d05c71a 100644 --- a/server.js +++ b/server.js @@ -53,7 +53,7 @@ async function refreshAccessToken() { }, body: new URLSearchParams({ client_id: "16435018183-9a880bertda0en85387ge8f8mgsves71.apps.googleusercontent.com", - client_secret: "YOUR_CLIENT_SECRET", // 실제 클라이언트 시크릿으로 변경 필요 + client_secret: process.env.CLIENT_SECRET, // 실제 클라이언트 시크릿으로 변경 필요 refresh_token: tokenStorage.refreshToken, grant_type: 'refresh_token' }) @@ -78,7 +78,7 @@ async function refreshAccessToken() { } app.get("/", (req, res) => { - const clientId = "16435018183-9a880bertda0en85387ge8f8mgsves71.apps.googleusercontent.com"; // 반드시 수정 + const clientId = "16435018183-9a880bertda0en85387ge8f8mgsves71.apps.googleusercontent.com"; // 반드시 수정 const redirectUri = "https://google-oauth-access-token-whs.hako.li/callback"; const authUrl = "https://accounts.google.com/o/oauth2/v2/auth?" +