diff --git a/server.js b/server.js index d05c71a..64dcd83 100644 --- a/server.js +++ b/server.js @@ -98,7 +98,7 @@ app.get("/exchange", async (req, res) => { if (!code) { return res.status(400).send("Authorization code가 필요합니다."); } - + try { const response = await fetch('https://oauth2.googleapis.com/token', { method: 'POST', @@ -107,7 +107,7 @@ app.get("/exchange", async (req, res) => { }, body: new URLSearchParams({ client_id: "16435018183-9a880bertda0en85387ge8f8mgsves71.apps.googleusercontent.com", - client_secret: "YOUR_CLIENT_SECRET", // 실제 클라이언트 시크릿으로 변경 필요 + client_secret: process.env.CLIENT_SECRET, // 실제 클라이언트 시크릿으로 변경 필요 code: code, grant_type: 'authorization_code', redirect_uri: "https://google-oauth-access-token-whs.hako.li/callback"