You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 13, 2018. It is now read-only.
Requests are authenticated on any protected routes with the access_token, and an account is attached to 'req' when the authentication is successful. It is vital to add an 'expand' parameter to options in creation of oauthFilter to expand 'customData' for example since I use it almost in any route. Will reduce latency time of api calls in half.
Example:
var stormpathFilters = stormpathRestify.createFilterSet(stormpathConfig);
oauthFilter = stormpathFilters.createOauthFilter({expand: 'customData'});
Then I could do:
oauthFilter(req, res, function (err) {
console.log(req.account.customData);
});