diff --git a/dashboard/proxyauth_login.html b/dashboard/proxyauth_login.html
deleted file mode 100644
index ba316b13c..000000000
--- a/dashboard/proxyauth_login.html
+++ /dev/null
@@ -1,81 +0,0 @@
-
-
-
-
-
-
- {{ login.loginTo }} ##NAME##
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

-
-
{{ login.loginTo }} ##NAME##
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/dashboard/vite.config.mjs b/dashboard/vite.config.mjs
index d83f77ee5..064755770 100644
--- a/dashboard/vite.config.mjs
+++ b/dashboard/vite.config.mjs
@@ -27,7 +27,6 @@ export default defineConfig({
oidc_error: resolve('oidc_error.html'),
oidc_interaction_confirm: resolve('oidc_interaction_confirm.html'),
oidc_interaction_abort: resolve('oidc_interaction_abort.html'),
- proxyauth_login: resolve('proxyauth_login.html'),
logs: resolve('logs.html'),
notfound: resolve('notfound.html'),
passwordreset: resolve('passwordreset.html'),
diff --git a/src/proxyauth.js b/src/proxyauth.js
index 7166e1371..928c91c03 100644
--- a/src/proxyauth.js
+++ b/src/proxyauth.js
@@ -10,22 +10,18 @@ exports = module.exports = {
const apps = require('./apps.js'),
assert = require('assert'),
blobs = require('./blobs.js'),
- branding = require('./branding.js'),
constants = require('./constants.js'),
dashboard = require('./dashboard.js'),
debug = require('debug')('box:proxyAuth'),
express = require('express'),
- fs = require('fs'),
hat = require('./hat.js'),
http = require('http'),
HttpError = require('connect-lastmile').HttpError,
HttpSuccess = require('connect-lastmile').HttpSuccess,
jwt = require('jsonwebtoken'),
- marked = require('marked'),
middleware = require('./middleware'),
oidc = require('./oidc.js'),
safe = require('safetydance'),
- translations = require('./translations.js'),
users = require('./users.js'),
util = require('util');
@@ -137,13 +133,6 @@ async function login(req, res, next) {
if (error) return next(new HttpError(403, 'No such app'));
const dashboardFqdn = (await dashboard.getLocation()).fqdn;
- const options = {
- OIDC_ENDPOINT: `https://${dashboardFqdn}`,
- LOGIN_URL: `https://${dashboardFqdn}/openid/auth?client_id=${appId}&scope=openid profile email&response_type=code&redirect_uri=https://${app.fqdn}/callback`,
- ICON_URL: `https://${dashboardFqdn}${app.iconUrl}`,
- NAME: app.label || app.fqdn,
- FOOTER: marked.parse(await branding.renderFooter())
- };
if (req.query.redirect) {
res.cookie('cloudronProxyAuthRedirect', req.query.redirect, {
@@ -153,13 +142,7 @@ async function login(req, res, next) {
});
}
- const translationAssets = await translations.getTranslations();
- let html = translations.translate(fs.readFileSync(__dirname + '/../dashboard/proxyauth_login.html', 'utf-8'), translationAssets);
- Object.keys(options).forEach(key => {
- html = html.replaceAll(`##${key}##`, options[key]);
- });
-
- return res.send(html);
+ res.redirect(302, `https://${dashboardFqdn}/openid/auth?client_id=${appId}&scope=openid profile email&response_type=code&redirect_uri=https://${app.fqdn}/callback`);
}
async function callback(req, res, next) {