Skip to content

Commit

Permalink
added env in backend
Browse files Browse the repository at this point in the history
  • Loading branch information
Akshat2Jain committed Dec 12, 2023
1 parent d22afa5 commit 622759a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down
2 changes: 1 addition & 1 deletion server/passportAuth.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 622759a

Please sign in to comment.