move dashboard setting into dashboard.js
This commit is contained in:
+6
-3
@@ -19,6 +19,7 @@ const assert = require('assert'),
|
||||
blobs = require('./blobs.js'),
|
||||
branding = require('./branding.js'),
|
||||
constants = require('./constants.js'),
|
||||
dashboard = require('./dashboard.js'),
|
||||
database = require('./database.js'),
|
||||
debug = require('debug')('box:oidc'),
|
||||
ejs = require('ejs'),
|
||||
@@ -79,13 +80,14 @@ async function clientsGet(id) {
|
||||
assert.strictEqual(typeof id, 'string');
|
||||
|
||||
if (id === tokens.ID_WEBADMIN) {
|
||||
const { fqdn:dashboardFqdn } = await dashboard.getLocation();
|
||||
return {
|
||||
id: tokens.ID_WEBADMIN,
|
||||
secret: 'notused',
|
||||
application_type: 'web',
|
||||
response_types: ['code', 'code token'],
|
||||
grant_types: ['authorization_code', 'implicit'],
|
||||
loginRedirectUri: `https://${settings.dashboardFqdn()}/authcallback.html`
|
||||
loginRedirectUri: `https://${dashboardFqdn}/authcallback.html`
|
||||
};
|
||||
} else if (id === tokens.ID_DEVELOPMENT) {
|
||||
return {
|
||||
@@ -789,8 +791,9 @@ async function start() {
|
||||
}
|
||||
};
|
||||
|
||||
debug(`start: create provider for ${settings.dashboardFqdn()} at ${ROUTE_PREFIX}`);
|
||||
const provider = new Provider(`https://${settings.dashboardFqdn()}${ROUTE_PREFIX}`, configuration);
|
||||
const { fqdn:dashboardFqdn } = await dashboard.getLocation();
|
||||
debug(`start: create provider for ${dashboardFqdn} at ${ROUTE_PREFIX}`);
|
||||
const provider = new Provider(`https://${dashboardFqdn}${ROUTE_PREFIX}`, configuration);
|
||||
|
||||
app.enable('trust proxy');
|
||||
provider.proxy = true;
|
||||
|
||||
Reference in New Issue
Block a user