ensure value of client.callback. fixes #99

This commit is contained in:
siacomuzzi 2014-07-18 15:42:15 -03:00
Родитель 668d6d2bed
Коммит b6fb4955cb
2 изменённых файлов: 3 добавлений и 4 удалений

6
app.js
Просмотреть файл

@ -209,7 +209,7 @@ var overrideIfAuthenticated = function (req, res, next) {
res.locals.account.tenant = client.tenant;
res.locals.account.clientId = client.clientID;
res.locals.account.clientSecret = client.clientSecret;
res.locals.account.callback = client.callback;
res.locals.account.callback = client.callback || 'http://YOUR_APP/callback';
next();
});
};
@ -238,7 +238,7 @@ var overrideIfClientInQsForPublicAllowedUrls = function (req, res, next) {
res.locals.account.tenant = client.tenant;
res.locals.account.clientId = client.clientID;
res.locals.account.clientSecret = client.clientSecret;
res.locals.account.callback = client.callback;
res.locals.account.callback = client.callback || 'http://YOUR_APP/callback';
res.locals.connectionName = req.query.conn;
next();
@ -264,7 +264,7 @@ var overrideIfClientInQs = function (req, res, next) {
res.locals.account.tenant = client.tenant;
res.locals.account.clientId = client.clientID;
res.locals.account.clientSecret = client.clientSecret;
res.locals.account.callback = client.callback;
res.locals.account.callback = client.callback || 'http://YOUR_APP/callback';
res.locals.connectionName = req.query.conn;
next();

Просмотреть файл

@ -1,7 +1,6 @@
var jade = require('jade');
var fs = require('fs');
var nconf = require('nconf');
var xtend = require('xtend');
var tmplPath = __dirname + '/browser.jade';
var widget_script_url = require('./widget_script_url');