k
Hey, I've been running my SuperTokens set up from a FastAPI backend in a Docker container on my local machine, with the managed service SuperTokens core. I've just migrated my Docker container to run on AWS and now having problems with logging in, session management etc. The FastAPI endpoint is accessible from my locally hosted front end, but guessing I'm running in to CORs issues or something similar. Any pointers you could give me to track down the problem? Thanks
r
hey @Kranos maybe this page will help for CORS issue: https://supertokens.com/docs/thirdpartyemailpassword/troubleshooting/cors-issues
k
Thanks - will have a read. The logs also said I need to set up https as well, so will work my way through it
Hi @rp - two questions having looked through all of this: 1. Should I still set the CORS allow_origins setting to http://localhost:3000 as that's where my front end is running locally or should it be my public IP address? 2. In the log files - I get this message: Exception: Since your API and website domain are different, for sessions to work, please use https on your apiDomain and don't set cookieSecure to false. I'm getting the SSL/TLS certificate sorted but don't know where the cookieSecure setting is to check it? Thanks
r
> Should I still set the CORS allow_origins setting to http://localhost:3000/ as that's where my front end is running locally or should it be my public IP address? localhost:3000 > In the log files - I get this message: Exception: Since your API and website domain are different, for sessions to work, please use https on your apiDomain and don't set cookieSecure to false. I'm getting the SSL/TLS certificate sorted but don't know where the cookieSecure setting is to check it? You need to use an apiDomain that starts with
https://
. If you can't do that, switch to using header based auth.
k
Got it - thanks, all working now!