Closed everpcpc closed 7 years ago
But there seems something wrong using the github enterprise auth. (While the default github.com works well.) I ran an auth procedure, the request logs is as follows: (I disabled the anonRead)
GET / 302 3.722 ms - 64
GET /wiki/Home 302 2.544 ms - 56
GET /login 304 354.384 ms - -
GET /auth/github 302 4.086 ms - 0
GET /auth/github/callback?code=xxxxxxxxxxxxx 302 1170.624 ms - 64
GET /auth/done 302 5.527 ms - 46
GET / 302 1.916 ms - 64
GET /wiki/Home 302 3.384 ms - 56
GET /login 304 209.308 ms - -
It seems the /auth/github/callback
got the correct user but did not set it in the request, so _getAuthDone()
got an undefined 'res.locals.user' .
I believe it's a issue with passport-github
or passport
.
see also: https://github.com/jaredhanson/passport-github/blob/master/lib/strategy.js#L53
passport-github allows passing these options to support a private github enterprise instance.