Skip to content

Instantly share code, notes, and snippets.

@dclarke-modus
Created November 14, 2017 04:08
Show Gist options
  • Save dclarke-modus/dcb0dbdbb1069b5129e6ebedcc09e411 to your computer and use it in GitHub Desktop.
Save dclarke-modus/dcb0dbdbb1069b5129e6ebedcc09e411 to your computer and use it in GitHub Desktop.
async getClient (clientId, clientSecret, callback) {
let client = await this.mongoClient.collection('client').findOne({"client" : clientId, "client_secret" : clientSecret}, {"_id" : 1});
let scopes = await this.mongoClient.collection('scope').find({"client_id" : client._id });
console.log(scopes.toArray());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment