Answer the question
In order to leave comments, you need to log in
Why does authorization fail?
Tell me, set a proxy
axios: {
proxy: true,
debug: false,
browserBaseURL: '/api',
},
proxy: {
'/api': {
target: process.env.API_URL,
},
},
auth: {
cookie: false,
strategies: {
'laravelJwt': {
provider: 'laravel/jwt',
url: '/v1',
redirect: {
login: '/login',
logout: '/login',
callback: '/',
home: '/',
},
endpoints: {
login: {
url: '/auth/login',
method: 'post',
propertyName: 'token',
},
logout: { url: '/auth/logout', method: 'post' },
refresh: { url: '/auth/refresh', method: 'post' },
user: { url: '/auth/me', method: 'post' },
},
token: {
property: 'access_token',
maxAge: 60 * 60,
},
refreshToken: {
maxAge: 20160 * 60,
},
},
},
},
HPM] Error occurred while proxying request 127.0.0.1:3080/api/v1/auth/me to https://site.ru/ [ECONNRESET] (https://nodejs.org/api/errors.html#errors_common_system_errors)
Answer the question
In order to leave comments, you need to log in
The problem is most likely not in the API, but in the states. Those. you do not save the state that the user is logged in. Accordingly, the user, after updating the page, is cleared.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question