Browse Source

emit event when removing OAuth2Client record

pull/2/head
Rob Colbert 2 years ago
parent
commit
5203c249c6
  1. 4
      app/services/oauth2.js

4
app/services/oauth2.js

@ -464,6 +464,10 @@ class OAuth2Service extends SiteService {
* @param {OAuth2Client} client the client to be removed
*/
async removeClient (client) {
// provides opportunity to allow or disallow and, if allowed, perform any
// additional cleanup needed when removing a client.
await this.emitDtpEvent('client.remove', client);
this.log.info('removing client', { clientId: client._id, });
await OAuth2Client.deleteOne({ _id: client._id });
}

Loading…
Cancel
Save