Skip to content

Commit

Permalink
Restrict refresh token to auth/token path
Browse files Browse the repository at this point in the history
  • Loading branch information
adamreisnz committed Dec 19, 2016
1 parent 32f26ba commit 03cec0e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/components/auth/auth.ctrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ module.exports = {

//Get locals
const COOKIE_MAX_AGE = req.app.locals.REFRESH_TOKEN_COOKIE_MAX_AGE;
const API_BASE_PATH = req.app.locals.API_BASE_PATH;

//Create refresh token and set cookie
const payload = user.getClaims();
Expand All @@ -96,6 +97,7 @@ module.exports = {
maxAge: COOKIE_MAX_AGE * 1000, //in ms
secure: req.secure,
httpOnly: true,
path: API_BASE_PATH + '/auth/token',
});
}

Expand Down

0 comments on commit 03cec0e

Please sign in to comment.