@memberstack/dom 1.0.60-alpha.15 → 1.0.60-alpha.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -23,9 +23,7 @@ var persist = function (res, persistence) {
|
|
|
23
23
|
};
|
|
24
24
|
var setCookie = function (res, useCookie) {
|
|
25
25
|
var _a, _b, _c;
|
|
26
|
-
console.log({ useCookie: useCookie });
|
|
27
26
|
var body = JSON.parse(res.body || "{}");
|
|
28
|
-
console.log({ body: body });
|
|
29
27
|
if (useCookie && ((_b = (_a = body === null || body === void 0 ? void 0 : body.data) === null || _a === void 0 ? void 0 : _a.tokens) === null || _b === void 0 ? void 0 : _b.accessToken)) {
|
|
30
28
|
cookies_1.setMemberCookie((_c = body.data) === null || _c === void 0 ? void 0 : _c.tokens.accessToken);
|
|
31
29
|
}
|
|
@@ -34,7 +32,6 @@ var initializeInterceptor = function (persistence, useCookie) {
|
|
|
34
32
|
var interceptor = new node_request_interceptor_1.RequestInterceptor([XMLHttpRequest_1.interceptXMLHttpRequest]);
|
|
35
33
|
interceptor.on("response", function (req, res) {
|
|
36
34
|
if (shouldIntercept(req)) {
|
|
37
|
-
console.log({ pathname: req.url.pathname });
|
|
38
35
|
if (req.url.pathname.endsWith("/logout")) {
|
|
39
36
|
return methods_1.unsetPersistedMember(persistence);
|
|
40
37
|
}
|