Skip to content

Instantly share code, notes, and snippets.

@zdwolfe
Created November 20, 2012 20:42
Show Gist options
  • Save zdwolfe/4120940 to your computer and use it in GitHub Desktop.
Save zdwolfe/4120940 to your computer and use it in GitHub Desktop.
Mongoose returning invalid JSON
...
clientID = '1234';
...
models.Client.find({clientID: clientID}, function(err, client) {
console.log('ClientPasswordStrategy client = ' + client);
console.log('client.clientID = ' + client.clientID);
}
Output:
ClientPasswordStrategy client = { name: 'CollabClient',
secret: 'CollabClientSecret',
clientID: 'CollabClientID',
redirectURI: 'http://localhost:3000/auth/callback',
_id: 50abe51812f5a9e37a000001,
__v: 0 }
client.clientID = undefined
@zdwolfe
Copy link
Author

zdwolfe commented Nov 20, 2012

Output:

ClientPasswordStrategy client = { name: 'CollabClient',
secret: 'CollabClientSecret',
clientID: 'CollabClientID',
redirectURI: 'http://localhost:3000/auth/callback',
_id: 50abe51812f5a9e37a000001,
__v: 0 }
client.clientID = undefined

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment