Lee SeJin

Login update

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