Skip to content

Commit

Permalink
fix(github): fix github enterprise authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
lucabertelli committed Oct 24, 2023
1 parent 474a215 commit a7e7285
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions controllers/auth/read.auth.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,20 +131,24 @@ router.get('/github/callback', async (req, res, next) => {
userInfo.displayName = json.name
userInfo.username = json.login
userInfo.email = json.email
})
.catch((err) => console.log(err))
})

logger.info('8')
logger.info(JSON.stringify(userInfo))
const user = authHelpers.cookie(userInfo, 'github')
logger.info('8')
logger.info(JSON.stringify(userInfo))
const user = authHelpers.cookie(userInfo, 'github')

logger.info('9')
logger.info(user)
logger.info('9')
logger.info(user)

res.cookie(envConstants.COOKIE_NAME, jwtHelpers.sign(user), cookieConstants)
res.redirect(global.redirect)
res.status(200)
res.cookie(
envConstants.COOKIE_NAME,
jwtHelpers.sign(user),
cookieConstants
)
res.redirect(global.redirect)
res.status(200)
})
.catch((err) => console.log(err))
})
})

router.get(
Expand Down

0 comments on commit a7e7285

Please sign in to comment.