I'm using the session reciep with an express backend. Should I set location.origin as the apiDomain,...
l
I'm using the session reciep with an express backend. Should I set location.origin as the apiDomain, when initializing the frontend, or the apiDomain of the hosted supertokens service? When putting in the apiDomain of the hosted supertokens service, I get CORS errors. When putting in location.origin, the backend logic works fine, but doesSessionExist() always resolves to false and refreshing the accessToken also doesn't work.
r
Hey. You need to set it to your express backend address
l
Alright, so in my case this would be location.origin. How can I debug why the refreshing fails?
r
Enable backend debug logs and see the logs when calling the refresh api
l
Ah alright, looked for an option in the init() args. Found the
DEBUG=com.supertokens
way of doing it, thanks!