We are running into an when testing our applicatio...
# support-questions-legacy
c
We are running into an when testing our application end-to-end with selenium in a containerised environment. We have 3 main containers: the frontend (supertokens-auth-react 0.37.0), the api (supertokens-python 0.18.7) and the chrome selenium driver. Since our browser is running in a separate container we are not using localhost but instead docker's dns. And as we are using the cookie transport method in a http environment the following error is thrown when we try to create a new session: "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". To prevent this exception from being thrown we tried setting
cookie_secure=False
in the
session.init
of the python api. This successfully suppressed the exception and a session was returned after consuming the OTP. However, the frontend SDK seemed to then fail to add these cookies to any following api call resulting in a 401 and the following exception on the backend "Session does not exist. Are you sending the session tokens in the request with the appropriate token transfer method?" How can we setup supertokens to work in a http environment with the api and frontend behind different domains using the cookie transport for the purpose of end-to-end testing?
8 Views