The token object contains data from a specific request with UserStore.js. In most cases, it will be a user object. For example, if a user signed in, it will return a token ID which only the app can look up to get the associated user object.
Retrieves the data associated with the token returned when using UserStore.js.
GET https://api.userstore.io/1/tokens/:ID
userstore.tokens.get(id, callback)
curl https://api.userstore.io/1/tokens/fdd8ed77417641dda3a39fa4ce591417 \
-u SECRET_KEY:
userstore.tokens.get(
'fdd8ed77417641dda3a39fa4ce591417',
function(err, token) {}
);
{
"type": "signin",
"data": {
"id": "lFVofRqhZ",
"email": "[email protected]",
"username": "johnsmith",
"first_name": "John",
"last_name": "Smith",
"is_active": true,
"is_email_verified": true,
"last_signin": "2014-08-04T23:48:34.288Z",
"updated_at": "2014-08-04T23:46:19.106Z",
"created_at": "2014-08-04T23:46:19.106Z"
}
}