3 var env
= require('gitter-web-env');
4 var identifyRoute
= env
.middlewares
.identifyRoute
;
6 var passport
= require('passport');
7 var trackLoginForProvider
= require('../../web/middlewares/track-login-for-provider');
8 var rememberMe
= require('../../web/middlewares/rememberme-middleware');
9 var ensureLoggedIn
= require('../../web/middlewares/ensure-logged-in');
10 var redirectAfterLogin
= require('../../web/middlewares/redirect-after-login');
11 var passportCallbackForStrategy
= require('../../web/middlewares/passport-callback-for-strategy');
16 identifyRoute('login-linkedin'),
17 trackLoginForProvider('linkedin'),
18 passport
.authorize('linkedin', {
20 state
: Math
.floor(Math
.random() * 100000)
25 identifyRoute('login-callback'),
26 passportCallbackForStrategy('linkedin', { failWithError
: true }),
28 rememberMe
.generateRememberMeTokenMiddleware
,
32 module
.exports
= routes
;