diff --git a/src/routes/oidc.js b/src/routes/oidc.js index 93dfb7e8a..ce5f8c9a8 100644 --- a/src/routes/oidc.js +++ b/src/routes/oidc.js @@ -9,7 +9,6 @@ exports = module.exports = { del }, - dashboardLoginCallback, destroyUserSession }; @@ -111,17 +110,6 @@ async function del(req, res, next) { next(new HttpSuccess(204)); } -async function dashboardLoginCallback(req, res, next) { - const [error, token] = await safe(tokens.add({ clientId: tokens.ID_WEBADMIN, identifier: req.user.id, expires: Date.now() + constants.DEFAULT_TOKEN_EXPIRATION_MSECS })); - if (error) return next(new HttpError(500, error)); - - await eventlog.add(req.user.ghost ? eventlog.ACTION_USER_LOGIN_GHOST : eventlog.ACTION_USER_LOGIN, auditSource, { userId: req.user.id, user: users.removePrivateFields(req.user) }); - - if (!req.user.ghost) safe(users.notifyLoginLocation(req.user, ip, userAgent, auditSource), { debug }); - - next(new HttpSuccess(200, token)); -} - async function destroyUserSession(req, res, next) { assert.strictEqual(typeof req.user, 'object'); diff --git a/src/server.js b/src/server.js index 46d44f381..166a28cfe 100644 --- a/src/server.js +++ b/src/server.js @@ -372,9 +372,6 @@ async function initializeExpressSync() { // well known router.get ('/well-known-handler/*', routes.wellknown.get); - // dashboard login callback - router.get ('/api/v1/oidc/callback', routes.oidc.dashboardLoginCallback); - // OpenID connect clients router.get ('/api/v1/oidc/clients', token, authorizeAdmin, routes.oidc.clients.list); router.post('/api/v1/oidc/clients', json, token, authorizeAdmin, routes.oidc.clients.add);