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) => {