Lee SeJin

Login update

......@@ -121,7 +121,8 @@ export const githubLoginCallback = async (_, __, profile, done) => {
try {
const user = await User.findOne({ githubId });
if (user) {
(user.githubId = githubId), (user.githubName = githubName);
user.githubId = githubId;
user.githubName = githubName;
await user.save();
return done(null, user);
} else {
......
......@@ -7,7 +7,7 @@ passport.use(new GithubStrategy(
{
clientID: process.env.GH_ID,
clientSecret: process.env.GH_SECRET,
callbackURL: `https://dev-profile-2021.herokuapp.com/auth/github/callback`
callbackURL: `http://localhost:5500/auth/github/callback`
},
githubLoginCallback
)
......