From 622759a60ec7e6d54c743aafd997ed9a98ef2309 Mon Sep 17 00:00:00 2001 From: akshat2jain Date: Tue, 12 Dec 2023 22:36:40 +0530 Subject: [PATCH] added env in backend --- server/index.js | 2 +- server/passportAuth.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/index.js b/server/index.js index fec2dc4..effe791 100644 --- a/server/index.js +++ b/server/index.js @@ -56,7 +56,7 @@ app.get( const user = req.user; if (user) { const token = jwt.sign({ user }, "your-secret-key", { expiresIn: "1h" }); - res.redirect(`https://bookyourride.onrender.com/book-ride?token=${token}`); + res.redirect(`${process.env.SECRET_CLIENT_URL}/book-ride?token=${token}`); } else { console.log("user not found"); } diff --git a/server/passportAuth.js b/server/passportAuth.js index 99c4c96..6c0ab75 100644 --- a/server/passportAuth.js +++ b/server/passportAuth.js @@ -9,7 +9,7 @@ passport.use( { clientID: process.env.GOOGLE_CLIENT_ID, clientSecret: process.env.GOOGLE_CLIENT_SECRET, - callbackURL: "https://glideride.onrender.com/auth/google/callback", + callbackURL: `${process.env.SECRET_CALLBACK_URL}/auth/google/callback`, scope: ['https://www.googleapis.com/auth/userinfo.profile', 'email'] }, async (req, accessToken, refreshToken, profile, done) => {