Skip to content

Commit

Permalink
feat(endpoint-token): include issuer in token
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrobertlloyd committed Jun 17, 2022
1 parent 0ff0bce commit 286e314
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/endpoint-token/lib/controllers/token.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const tokenController = {
* @returns {Promise|object} HTTP response
*/
async post(request, response, next) {
const { publication } = request.app.locals;
const { application, publication } = request.app.locals;
const { client_id, code, redirect_uri } = request.query;

try {
Expand Down Expand Up @@ -128,6 +128,7 @@ export const tokenController = {
const authResponse = {
access_token: jwt.sign(tokenData, process.env.TOKEN_SECRET, {
expiresIn: 60 * 60 * 24 * 365,
issuer: application.url + request.baseUrl,
}),
me: accessTokenMe,
scope: body.scope,
Expand Down

0 comments on commit 286e314

Please sign in to comment.