Toggle navigation
Toggle navigation
This project
Loading...
Sign in
이세진
/
dev-profile
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
10
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Lee SeJin
2021-06-16 21:42:53 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9850ee33f85a2e1eda3d4dc67c53305f50a90cc9
9850ee33
1 parent
5aa6f91e
Login update
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
src/controllers/userController.js
src/passport.js
src/controllers/userController.js
View file @
9850ee3
...
...
@@ -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
{
...
...
src/passport.js
View file @
9850ee3
...
...
@@ -7,7 +7,7 @@ passport.use(new GithubStrategy(
{
clientID
:
process
.
env
.
GH_ID
,
clientSecret
:
process
.
env
.
GH_SECRET
,
callbackURL
:
`http
s://dev-profile-2021.herokuapp.com
/auth/github/callback`
callbackURL
:
`http
://localhost:5500
/auth/github/callback`
},
githubLoginCallback
)
...
...
Please
register
or
login
to post a comment