Linter: Fix all lint errors
Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
@@ -7,7 +7,7 @@ const config = require('../../../config')
|
||||
const logger = require('../../../logger')
|
||||
const { passportGeneralCallback } = require('../utils')
|
||||
|
||||
let oauth2Auth = module.exports = Router()
|
||||
const oauth2Auth = module.exports = Router()
|
||||
|
||||
class OAuth2CustomStrategy extends Strategy {
|
||||
constructor (options, verify) {
|
||||
@@ -20,7 +20,7 @@ class OAuth2CustomStrategy extends Strategy {
|
||||
|
||||
userProfile (accessToken, done) {
|
||||
this._oauth2.get(this._userProfileURL, accessToken, function (err, body, res) {
|
||||
var json
|
||||
let json
|
||||
|
||||
if (err) {
|
||||
return done(new InternalOAuthError('Failed to fetch user profile', err))
|
||||
@@ -33,7 +33,7 @@ class OAuth2CustomStrategy extends Strategy {
|
||||
}
|
||||
|
||||
checkAuthorization(json, done)
|
||||
let profile = parseProfile(json)
|
||||
const profile = parseProfile(json)
|
||||
profile.provider = 'oauth2'
|
||||
|
||||
done(null, profile)
|
||||
@@ -91,7 +91,7 @@ function checkAuthorization (data, done) {
|
||||
|
||||
OAuth2CustomStrategy.prototype.userProfile = function (accessToken, done) {
|
||||
this._oauth2.get(this._userProfileURL, accessToken, function (err, body, res) {
|
||||
var json
|
||||
let json
|
||||
|
||||
if (err) {
|
||||
return done(new InternalOAuthError('Failed to fetch user profile', err))
|
||||
@@ -104,7 +104,7 @@ OAuth2CustomStrategy.prototype.userProfile = function (accessToken, done) {
|
||||
}
|
||||
|
||||
checkAuthorization(json, done)
|
||||
let profile = parseProfile(json)
|
||||
const profile = parseProfile(json)
|
||||
profile.provider = 'oauth2'
|
||||
|
||||
done(null, profile)
|
||||
|
||||
Reference in New Issue
Block a user