fbed7b0c by Adam Heath

Tweaks to the /token paths.

1 parent d7be2e0c
......@@ -20,8 +20,8 @@ const defaultOptions = {
callback: '/login/callback',
logout: '/logout',
logoutReturnTo: '/',
refreshToken: '/login/refresh/token',
tokens: '/login/tokens',
refreshToken: '/login/token/refresh',
token: '/login/token',
},
session: {
secret: 'some-secret',
......@@ -201,7 +201,7 @@ export default async (...options) => {
const { user: { tokenSet: { access_token, expires_at } = {} } = {} } = passport
res.end(JSON.stringify({ access_token, expires_at }))
})
auth.get(options.auth.tokens, async (req, res, next) => {
auth.get(options.auth.token, async (req, res, next) => {
const passport = await refreshToken(req, true)
if (passport) {
const { user: { tokenSet } } = passport
......