Hi, if my backend API url is not in the root path, for example, https://mydomain.dev/api, how do I s...
k
Hi, if my backend API url is not in the root path, for example, https://mydomain.dev/api, how do I set it up for SuperTokens? I remember reading some where in the docs that I need an extra step, but I can't remember
r
Hey @kumkee
You need to set the apiBasePath on the backend and frontend SDK in appInfo to “/api/auth”
Do you have a reverse proxy on the backend which strips away the “/api” part?
k
I don't have a proxy. My frontend and backend use the same domain. Frontend is at "`/`" backend at "`/api`"
So I can't set both to the same value.
r
you don't need to set the same values for both. websiteBasePath can be
/auth
, and apiBasePath can be
/api/auth
k
With that, my
/api/auth/dashboard
returns a blank page. I am using FastAPI as my backend.
r
Do you see any errors on the browser’s console log when navigating to that page?
k
I gave up. I use two different domains for now. If I try using same domain again in the future, I'll report you back what happen.
3 Views