linus_hologram
02/19/2020, 6:13 PMrp
02/19/2020, 6:35 PMlinus_hologram
02/19/2020, 6:36 PMlinus_hologram
02/20/2020, 5:42 PMAdiboi
02/21/2020, 5:23 PMAdiboi
02/21/2020, 5:23 PMlinus_hologram
02/22/2020, 8:19 PMlinus_hologram
02/22/2020, 8:20 PMrp
02/23/2020, 2:27 AMrp
02/23/2020, 2:27 AMlinus_hologram
02/23/2020, 10:55 AMuser
03/06/2020, 9:20 PMconst HTTP = axios.create({
baseURL: process.env.VUE_APP_API_BASE_URL,
withCredentials: true,
xsrfHeaderName: 'anti-csrf',
})
SuperTokensRequest.makeSuper(HTTP)
but SuperTokens seems to not be aware of the baseURL when dealing with a 440 response from the server when a token is expired. I.e., when the session token expires and Supertokens automatically refreshes it, it does a request with the baseURL duplicated, e.g., it tries to access "/api/v2/api/v2/subjects" when the baseURL is set to "/api/v2" and I was trying to make a query to "/subjects".rp
03/07/2020, 2:28 AMrp
03/07/2020, 3:10 AMrp
03/07/2020, 7:06 AM4.0.12
of the supertokens-website
package. If you are currently using a version that is lesser than v4, then do let us know which one, so that we can fix that too (since v4 has breaking changes). Instead, if you want to migrate to the latest version of this package, please also make sure that you have updated to the latest backend SDK (because of this issue: https://github.com/supertokens/supertokens-website/issues/6).
Also, I'm not sure what led you to have the issue of duplicate baseURL
. If this is not solved already by our recent update, please provide the following information:
- What params are you giving to the init
function?
- A sample API request you are making using your created axios instance
Thanks!user
03/10/2020, 7:49 PMrp
03/11/2020, 3:20 AMrp
03/12/2020, 11:41 AMrp
04/09/2020, 2:54 PMSun Walker
04/09/2020, 3:03 PMSun Walker
04/11/2020, 2:08 PMrp
04/11/2020, 2:09 PMrp
04/11/2020, 2:09 PMrp
04/11/2020, 2:10 PMrp
04/11/2020, 2:13 PMlet userId = "SomeUserId";
let jwtPayload = {userType: "admin"};
await supertokens.createNewSession(res, userId, jwtPayload);
rp
04/11/2020, 2:15 PMlet session = await supertokens.getSession(req, res, true);
let userId = session.getUserId();
let userType = session.getJWTPayload().userType
Sun Walker
04/11/2020, 2:15 PMconst payloadData = pluck(user, ['userType', 'isProvider']);
const jwtPayload = { ...payloadData };
const sessionData = pluck(user, ['id', 'username', 'email', 'userType', 'isProvider']);
await createNewSession(res, user.id, jwtPayload, sessionData);
Sun Walker
04/11/2020, 2:15 PMrp
04/11/2020, 2:15 PMSun Walker
04/11/2020, 2:16 PMSun Walker
04/11/2020, 2:16 PM