Here is my config:
auth: {
plugins: ['~/plugins/auth.js'],
strategies: {
local: {
scheme: 'refresh',
token: {
property: 'jwtToken',
},
refreshToken: {
property: 'refreshToken',
data: 'refreshToken',
},
user: false,
endpoints: {
login: { url: '/api/account/authenticate', method: 'post' },
logout: { url: '/api/account/logout', method: 'post' },
mPassLogout: { url: '/api/account/init-mpass-logout', method: 'get' },
refresh: {
url: '/api/account/refresh-token',
method: 'post',
data: {
test: 123,
},
},
user: false,
},
},
},
},
In refresh endpoint object I want to send refreshToken and token in the data object, how can I implement this? I can't modify the backend apis. The docs says that endpoints just extend the axios options but how can I access the refreshToken and token in this data? Also after request I need to set the new refresh and jwtToken.