You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.
The CHECK_AUTH method in the JWT auth provider returns response.data, when a "user" route is provided in configuration.
/**
* Get user infos
*/
if (routes.user) {
let response = await httpClient.get(routes.user);
if (response.status < 200 || response.status >= 300) {
throw new Error(response.statusText);
}
return response.data;
}
But then in store/auth.js it's commiting the "setUser" mutation using response.data as a parameter again:
This means incoming data from the axios request would have to be response.data.data. I believe that's an error. In store/auth.js it should just commit "setUser" with the parameter response, since it's already containing the user data at this point.
As is I'm getting redirected to the login screen despite logging in successfully (token is set in localStorage) whenever I set a route to get the "user" data from.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The CHECK_AUTH method in the JWT auth provider returns
response.data
, when a "user" route is provided in configuration.But then in store/auth.js it's commiting the "setUser" mutation using
response.data
as a parameter again:This means incoming data from the axios request would have to be response.data.data. I believe that's an error. In store/auth.js it should just commit "setUser" with the parameter
response
, since it's already containing the user data at this point.As is I'm getting redirected to the login screen despite logging in successfully (token is set in localStorage) whenever I set a route to get the "user" data from.
The text was updated successfully, but these errors were encountered: