Skip to content

Instantly share code, notes, and snippets.

@aroman
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aroman/524888b44ce24d20a7b4 to your computer and use it in GitHub Desktop.
Save aroman/524888b44ce24d20a7b4 to your computer and use it in GitHub Desktop.
// Client from MongoDB
{
"_id": {
"$oid": "52ec25f12ebb928c81b4d2c8"
},
"name": "test",
"redirect_uri": "http://localhost:3001/oauth_test",
"trusted": true
}
...
OAuth.Client.findById(username, function (err, client) {
...
console.log(JSON.parse(JSON.stringify(client)).trusted); // prints "true"
console.log(client.get('trusted')); // prints "true"
console.log(client.trusted); // prints "undefined"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment