new(core.gbapp): #387 adding /setupSecurity multiple tokens.
This commit is contained in:
parent
db21ad6574
commit
863591741d
1 changed files with 22 additions and 19 deletions
|
@ -513,7 +513,7 @@ export class GBMinService {
|
||||||
tokenName ? host : min.instance.authenticatorAuthorityHostUrl,
|
tokenName ? host : min.instance.authenticatorAuthorityHostUrl,
|
||||||
tokenName ? tenant : min.instance.authenticatorTenant)
|
tokenName ? tenant : min.instance.authenticatorTenant)
|
||||||
);
|
);
|
||||||
const resource = 'https://graph.microsoft.com';
|
const resource = tokenName ? '' : 'https://graph.microsoft.com';
|
||||||
|
|
||||||
// Calls MSFT to get token.
|
// Calls MSFT to get token.
|
||||||
|
|
||||||
|
@ -525,9 +525,12 @@ export class GBMinService {
|
||||||
tokenName ? clientSecret : instance.marketplacePassword,
|
tokenName ? clientSecret : instance.marketplacePassword,
|
||||||
async (err, token) => {
|
async (err, token) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|
||||||
const msg = `handleOAuthTokenRequests: Error acquiring token: ${err}`;
|
const msg = `handleOAuthTokenRequests: Error acquiring token: ${err}`;
|
||||||
|
|
||||||
GBLog.error(msg);
|
GBLog.error(msg);
|
||||||
res.send(msg);
|
res.send(msg);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// Saves token to the database.
|
// Saves token to the database.
|
||||||
|
|
Loading…
Add table
Reference in a new issue