|
@ -178,7 +178,7 @@ class OAuth2Service extends SiteService { |
|
|
* calling host. |
|
|
* calling host. |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
|
|
|
const client = await OAuth2Client.updateOne( |
|
|
const client = await OAuth2Client.findOneAndUpdate( |
|
|
{ |
|
|
{ |
|
|
'site.domain': clientDefinition.domain, |
|
|
'site.domain': clientDefinition.domain, |
|
|
'site.domainKey': clientDefinition.domainKey, |
|
|
'site.domainKey': clientDefinition.domainKey, |
|
@ -199,7 +199,10 @@ class OAuth2Service extends SiteService { |
|
|
redirectUri: clientDefinition.coreAuth.redirectUri, |
|
|
redirectUri: clientDefinition.coreAuth.redirectUri, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
{ upsert: true, returnDocument: true }, |
|
|
{ |
|
|
|
|
|
upsert: true, // create if it doesn't exist
|
|
|
|
|
|
"new": true, // return the modified version
|
|
|
|
|
|
}, |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
this.log.info('new OAuth2 client updated', { |
|
|
this.log.info('new OAuth2 client updated', { |
|
|