thisjust
03/05/2021, 6:14 AMrp
03/05/2021, 6:15 AMrp
03/05/2021, 6:15 AMrp
03/05/2021, 6:15 AMthisjust
03/05/2021, 6:17 AMAuth.jsx
file, where SuperTokens.init
is run in the outmost scope, whereas the call to fetch
occurs inside that file's React componentrp
03/05/2021, 6:17 AMrp
03/05/2021, 6:17 AMthisjust
03/05/2021, 6:19 AMUncaught (in promise) Error: No session exists
rp
03/05/2021, 6:19 AMrp
03/05/2021, 6:20 AMhttp://localhost:8888
at the moment?thisjust
03/05/2021, 6:21 AMthisjust
03/05/2021, 6:22 AMnetilfy dev
so ... the web server is served on port 3000, but gets proxied through port 8888 via netlify devthisjust
03/05/2021, 6:23 AMthisjust
03/05/2021, 6:24 AMthisjust
03/05/2021, 6:25 AMrp
03/05/2021, 6:25 AMconsole.log("line 378")
and in line 398, do console.log("value of doNotDoInterception", doNotDoInterception)
and then tell me what the output of those are in your console once you call the API?rp
03/05/2021, 6:25 AMthisjust
03/05/2021, 6:28 AMthisjust
03/05/2021, 6:28 AMif (!AuthHttpRequest.initCalled) {
throw Error("init function not called");
console.log("line 378")
}
rp
03/05/2021, 6:28 AMthisjust
03/05/2021, 6:28 AMthrow
, just after itthisjust
03/05/2021, 6:29 AMthisjust
03/05/2021, 6:30 AMthisjust
03/05/2021, 6:30 AM} catch (err) {
if (err.message === "Please provide a valid domain name") {
// .origin gives the port as well..
doNotDoInterception =
utils_1.normaliseURLDomainOrThrowError(window.location.origin) !==
AuthHttpRequest.apiDomain && AuthHttpRequest.addedFetchInterceptor;
} else {
throw err;
}
console.log("value of doNotDoInterception", doNotDoInterception)
}
rp
03/05/2021, 6:30 AMrp
03/05/2021, 6:30 AMif (!doNotDoInterception) return
thisjust
03/05/2021, 6:35 AMline 378
value of doNotDoInterception true
rp
03/05/2021, 6:35 AMdoNotDoInterception
is true
.thisjust
03/05/2021, 6:36 AMrp
03/05/2021, 6:36 AM