File tree Expand file tree Collapse file tree 1 file changed +15
-11
lines changed Expand file tree Collapse file tree 1 file changed +15
-11
lines changed Original file line number Diff line number Diff line change 1
- 'use strict'
1
+ import { Router } from "express" ;
2
+ import * as passport from "passport" ;
3
+ import { Strategy as OpenIDStrategy } from "@passport-next/passport-openid" ;
4
+
5
+ import * as config from "../../config" ;
6
+ import * as models from "../../models" ;
7
+ import * as logger from "../../logger" ;
8
+ import { urlencodedParser } from "../../utils" ;
9
+ import { setReturnToFromReferer } from "../utils" ;
2
10
3
- const Router = require ( 'express' ) . Router
4
- const passport = require ( 'passport' )
5
- const OpenIDStrategy = require ( '@passport-next/passport-openid' ) . Strategy
6
- const config = require ( '../../config' )
7
- const models = require ( '../../models' )
8
- const logger = require ( '../../logger' )
9
- const { urlencodedParser } = require ( '../../utils' )
10
- const { setReturnToFromReferer } = require ( '../utils' )
11
11
12
12
const openIDAuth = module . exports = Router ( )
13
13
@@ -33,11 +33,15 @@ passport.use(new OpenIDStrategy({
33
33
}
34
34
if ( needSave ) {
35
35
user . save ( ) . then ( function ( ) {
36
- if ( config . debug ) { logger . info ( 'user login: ' + user . id ) }
36
+ if ( config . debug ) {
37
+ logger . info ( 'user login: ' + user . id )
38
+ }
37
39
return done ( null , user )
38
40
} )
39
41
} else {
40
- if ( config . debug ) { logger . info ( 'user login: ' + user . id ) }
42
+ if ( config . debug ) {
43
+ logger . info ( 'user login: ' + user . id )
44
+ }
41
45
return done ( null , user )
42
46
}
43
47
}
You can’t perform that action at this time.
0 commit comments