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 25, 2023
1 parent ed9914d commit e4fa2b5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions controllers/auth/read.auth.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ router.get('/guest', async (req, res, next) => {
router.get('/github', passport.authenticate('github', { scope: ['read:user'] }))

router.get('/githubcallback', async (req, res, next) => {
logger.debug('inside callback')
try {
// if (res.locals.provider.spec.strategy === 'guest') {
const user = {
Expand All @@ -53,9 +54,9 @@ router.get('/githubcallback', async (req, res, next) => {

logger.debug(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) {
next(err)
}
Expand Down

0 comments on commit e4fa2b5

Please sign in to comment.