Hi, I'm trying to implement a basic POC in python (running core in a docker container), but I'm havi...
s
Hi, I'm trying to implement a basic POC in python (running core in a docker container), but I'm having issues configuring supertokens. I'm just running a simple FastAPI server and want to test social login. However, I'm getting a bunch of log messages from the middleware about not being able to handle my request (no recipe matched), and it looks like the middleware is just being bypassed. Here's my code (using the client_id/secret from the docs...)
r
Hey @sklorn
Can you show me how you are querying the backend?
s
I'm just running core in
docker run -p 3567:3567 -d registry.supertokens.io/supertokens/supertokens-postgresql
that copy/paste is literally everything I have (minus the imports)
r
right. Are you querying your fastapi server?
s
$ curl localhost:8000/api/hello {"message":"Hello World"}
r
alright! So similarly, you can query the APIs exposed by the middleware. Here is the API spec: https://app.swaggerhub.com/apis/supertokens/FDI
s
which API should I query? also how can I use supertokens to protect the
/api/hello
route?
r
The ones in the thirdpartyemailpassword section, since that's the recipe you are using
s
> See this for securing the API route: https://supertokens.com/docs/thirdpartyemailpassword/common-customizations/verify-session Ah I see, so I need to implement the session check myself
> The ones in the thirdpartyemailpassword section, since that's the recipe you are using how can I start the flow for a new user?
r
well yea, for the APIs you want to guard with sessions, you need to use the verify_session function in those APIs.
> how can I start the flow for a new user? You should checkout the frontend quick setup guide. It shows you how to setup the frontend with our pre built UI for your website.
s
gotcha.. thanks!