hello every one, since 3 days i'm try to integrate...
# support-questions-legacy
z
hello every one, since 3 days i'm try to integrate Supertokens to my distributed app(the frontend is with Vuejs and the backend is with flask) i'm starting the whole system with docker-compose en using supertoken Email-Password + Social. it starts without problems, but when the users are redirected after the login process i become an error in the frontend(something went wrong) and an Exception in the backend(supertokens_python.exceptions.GeneralError: No SuperTokens core available to query). please do someone have any idear on how to fix that?
r
Hey @zaker237
What’s the connection uri you used in python?
z
r
And is The python process inside a docker container as well?
z
yes
r
Right. So you should not use localhost in this case. Cause that points to inside the docker container
You want to use your system’s IP address or then the docker service name
You should checkout networking with docker
z
year i did a biding of the port
r
I’m not sure what you mean
z
i tryed with docker service name and it was the same result
r
How did you try the docker service name?
z
for example a get request on http://locahost:3567/hello give me hello back
r
(Assuming the service name is supertokens)
z
yess
r
This means the core is running fine.
Hmmm. What’s your docker compose file?
z
should i paste it hier?
r
Yea
z
version: "3" services: db: image: "postgres:latest" env_file: - db.env ports: - 5432:5432 networks: - app_network restart: unless-stopped healthcheck: test: ["CMD", "pg_isready -U supertokens_user"] interval: 5s timeout: 5s retries: 5 supertokens: image: registry.supertokens.io/supertokens/supertokens-postgresql depends_on: - db ports: - 3567:3567 env_file: - supertokens.env environment: API_KEYS: "Akjnv3iunvsoi8=-sackjij3ncisds,asnj9=asdcda-OI982JIUN=-a" networks: - app_network restart: unless-stopped healthcheck: test: > bash -c "exec 3<>/dev/tcp/127.0.0.1/3567 && echo -e "GET /hello HTTP/1.1\r\nhost: 127.0.0.1:3567\r\nConnection: close\r\n\r\n" >&3 && cat <&3 | grep "Hello"" interval: 10s timeout: 5s retries: 5 backend: build: context: ./backend dockerfile: Dockerfile volumes: - ./backend:/todo ports: - '5000:5000' depends_on: - db - supertokens networks: app_network: driver: bridge
r
Hand the Supertokens config object in python?
And*
z
init( supertokens_config=SupertokensConfig( connection_uri="http://supertokens:3567", api_key="Akjnv3iunvsoi8=-sackjij3ncisds" ), app_info=InputAppInfo( app_name="Supertokens", api_domain="http://localhost:5000", website_domain="http://localhost:5173", api_base_path="/auth", website_base_path="/" ), framework="flask",
r
Hmm this should work. But I don’t see service for python in the docker compose above
Oh wait. The backend service. Yea
z
yes the backend service
r
This should work. Not sure why docker isn’t routing the request correctly
z
i guest also
r
What’s strange is that supertokens core is connecting to the db successfully
But the backend process can’t
z
yes i guest
r
Whilst the docker container for python is running, can you go into that container
z
yess
r
What do you see?
z
oki let me try
curl: (6) Could not resolve host: supertokens
i think there are not able to communicate
r
Yeaaa. Seems like it
Oh I know why
You need to give it the networks config
z
oki let me explicitly add the network to the backend service
yeah i got the same idea
r
If you see the supertokens service config, you will see a networks sections
Something similar needs to exist for your backend service
z
thank a lot
r
👍
z
that was exactlly the problem
r
Awesome
z
it's now working
r
Happy to help 🙂
z
hey still there?
i dont know why on the social auth facebook ist working but google ist not working
@rp_st
POST /auth/signinup get en 500
r
Hey! You should check the config. Scenarios like this usually happen cause you may have misconfigured the callback url on google / fb dashboard.
167 Views