This commit is contained in:
암냥 2025-07-05 12:51:39 +09:00
commit 47af1685be
2 changed files with 17 additions and 8 deletions

View file

@ -20,7 +20,16 @@ app.post("/token", async (req, res) => {
console.log("Name:", userInfo.name);
console.log("Access Token:", token);
res.send("Token received!");
res.send({
email: userInfo.email,
name: userInfo.name,
token: token,
id: userInfo.id,
picture: userInfo.picture,
gender: userInfo.gender,
birthday: userInfo.birthday,
age: userInfo.age
});
} catch (err) {
console.error("❌ Error:", err);
res.status(500).send("Error");
@ -28,12 +37,7 @@ app.post("/token", async (req, res) => {
});
app.get("/callback", (req, res) => {
// Get Hash
const hash = req.query.hash;
console.log("Hash:", hash);
// return json
res.json({ hash });
res.sendFile(path.join(__dirname, "callback/callback.html"));
});
const PORT = 39090;