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
rp_st
01/21/2023, 11:42 AM
Hey. You need to set it to your express backend address
l
leolurchig
01/21/2023, 11:43 AM
Alright, so in my case this would be location.origin. How can I debug why the refreshing fails?
r
rp_st
01/21/2023, 11:43 AM
Enable backend debug logs and see the logs when calling the refresh api
l
leolurchig
01/21/2023, 11:47 AM
Ah alright, looked for an option in the init() args. Found the
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).