Ensure we setup the correct OAuth redirectURI if altDomain is used

This commit is contained in:
Johannes Zellner
2017-10-05 01:02:07 +02:00
parent afed3f3725
commit 3fb5034ebd
+1 -1
View File
@@ -248,7 +248,7 @@ function setupOauth(app, options, callback) {
if (!app.sso) return callback(null);
var appId = app.id;
var redirectURI = 'https://' + config.appFqdn(app.location);
var redirectURI = 'https://' + (app.altDomain || config.appFqdn(app.location));
var scope = 'profile';
clients.delByAppIdAndType(appId, clients.TYPE_OAUTH, function (error) { // remove existing creds