Created
November 26, 2012 00:08
-
-
Save zdwolfe/4145958 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server.serializeClient(function(clientString, done) { | |
// @TODO for some reason clientJSON is not valid JSON | |
console.log('clientString = ' + clientString); | |
var client = JSON.parse(clientString); | |
console.log('_id = ' + client._id); | |
console.log('name = ' + client.name); | |
console.log('secret = ' + client.secret); | |
done(null, client._id); | |
}); | |
Output: | |
clientString = [{"name":"CollabClient","secret":"CollabClientSecret","clientID":"CollabClientID","redirectURI":"/auth/callback","_id":"50b2ad73affd031c1d000001","__v":0}] | |
_id = undefined | |
name = undefined | |
secret = undefined | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment