summaryrefslogtreecommitdiff
path: root/lib/web/auth/oauth2
diff options
context:
space:
mode:
authorDavid Mehren2021-02-16 20:15:15 +0100
committerGitHub2021-02-16 20:15:15 +0100
commit59819be34c2428450528362a5bbb74b6424d15d2 (patch)
treead80595f5dd94a7ac63bc1481943ae7b356ddb17 /lib/web/auth/oauth2
parent6b8fa94402539168a5bd574ddcc17eeae4910bd0 (diff)
parent136d895d155f28c2e75b3af206549acaa2a354ed (diff)
Merge pull request #872 from hedgedoc/renovate/master-major-linters
Diffstat (limited to '')
-rw-r--r--lib/web/auth/oauth2/index.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/web/auth/oauth2/index.js b/lib/web/auth/oauth2/index.js
index 9cb17f26..e9032e0b 100644
--- a/lib/web/auth/oauth2/index.js
+++ b/lib/web/auth/oauth2/index.js
@@ -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)