dleiva04
01/07/2023, 12:23 AMrp_st
01/07/2023, 4:04 AMrp_st
01/07/2023, 4:04 AMrp_st
01/07/2023, 4:04 AMrp_st
01/07/2023, 4:05 AMdleiva04
01/07/2023, 4:15 AMrp_st
01/07/2023, 4:23 AMrp_st
01/07/2023, 4:23 AMdleiva04
01/07/2023, 4:28 AMDepends(verify_session())
in every endpointrp_st
01/07/2023, 4:32 AMdleiva04
01/07/2023, 4:32 AMrp_st
01/07/2023, 4:33 AMdleiva04
01/07/2023, 4:33 AMrp_st
01/07/2023, 4:34 AMrp_st
01/07/2023, 4:34 AMdleiva04
01/07/2023, 4:35 AMapp.add_middleware(get_middleware())
this one?dleiva04
01/07/2023, 4:35 AMrp_st
01/07/2023, 4:36 AMdleiva04
01/07/2023, 4:36 AMrp_st
01/07/2023, 4:37 AMdleiva04
01/07/2023, 4:37 AMrp_st
01/07/2023, 4:37 AMrp_st
01/07/2023, 4:37 AMdleiva04
01/07/2023, 4:37 AMrp_st
01/07/2023, 4:39 AMdleiva04
01/07/2023, 5:51 AMdleiva04
01/07/2023, 5:51 AMKShivendu
01/07/2023, 6:29 AMverify_session()
in fastapi. So the SDK is fine. There should be some issue in the config.
I'll try to replicate your setup now.dleiva04
01/07/2023, 6:29 AMdleiva04
01/07/2023, 6:29 AMKShivendu
01/07/2023, 6:29 AM@router.patch("/{listing_id}")
works with valid access token? Do you get 200?dleiva04
01/07/2023, 6:30 AMKShivendu
01/07/2023, 6:30 AMKShivendu
01/07/2023, 6:31 AMdleiva04
01/07/2023, 6:31 AMKShivendu
01/07/2023, 6:31 AMdleiva04
01/07/2023, 6:32 AMdleiva04
01/07/2023, 6:32 AMKShivendu
01/07/2023, 6:32 AMKShivendu
01/07/2023, 6:33 AMKShivendu
01/07/2023, 6:36 AM@app.get("/sessioninfo")
async def secure_api(s: SessionContainer = Depends(verify_session())):
return {
"sessionHandle": s.get_handle(),
"userId": s.get_user_id(),
"accessTokenPayload": s.get_access_token_payload(),
}
KShivendu
01/07/2023, 6:37 AMfrom supertokens_python.recipe.session import SessionContainer
KShivendu
01/07/2023, 6:51 AMdleiva04
01/07/2023, 6:52 AMKShivendu
01/07/2023, 7:00 AM/auth/signup/email/exists?email=test@example.com
KShivendu
01/07/2023, 7:03 AMapp = CORSMiddleware(
app=app,
allow_origins=[config.app_info.website_domain],
allow_credentials=True,
allow_methods=["GET", "PUT", "POST", "DELETE", "OPTIONS", "PATCH"],
allow_headers=["Content-Type"] + get_all_cors_headers(),
)
KShivendu
01/07/2023, 7:12 AMbound method BaseHTTPMiddleware.call_next of <supertokens_python.framework.fastapi.fastapi_middleware.get_middleware.<locals>.Middleware object at 0x7f72d0a91550
dleiva04
01/07/2023, 8:00 AMKShivendu
01/09/2023, 5:50 AMKShivendu
01/09/2023, 5:56 AMpython
if __name__ == "__main__":
uvicorn.run(app, host="0.0.0.0", port=3001)
dleiva04
01/09/2023, 6:07 AMdleiva04
01/09/2023, 6:08 AMdleiva04
01/09/2023, 6:23 AMdleiva04
01/09/2023, 6:28 AMKShivendu
01/09/2023, 7:26 AMKShivendu
01/09/2023, 7:26 AMdleiva04
01/10/2023, 12:26 AMdleiva04
01/10/2023, 12:27 AMdleiva04
01/10/2023, 12:43 AMrp_st
01/10/2023, 4:14 AMrp_st
01/10/2023, 4:14 AMdleiva04
01/10/2023, 4:39 AMKShivendu
01/10/2023, 6:03 AMpip freeze > requirements.txt
?KShivendu
01/10/2023, 6:06 AMapp.add_middleware(get_middleware())
.KShivendu
01/10/2023, 6:08 AMresponse = await call_next(request)
of fastapi_middleware.py
KShivendu
01/10/2023, 6:09 AMdleiva04
01/10/2023, 8:10 AMrp_st
01/10/2023, 8:30 AMdleiva04
01/10/2023, 8:33 AMrp_st
01/10/2023, 8:33 AMdleiva04
01/10/2023, 8:40 AMdleiva04
01/10/2023, 8:40 AMdleiva04
01/10/2023, 8:40 AMdleiva04
01/10/2023, 8:40 AMdleiva04
01/10/2023, 8:40 AMdleiva04
01/10/2023, 8:41 AMdleiva04
01/10/2023, 8:41 AMdleiva04
01/10/2023, 8:41 AMdleiva04
01/10/2023, 8:48 AMKShivendu
01/10/2023, 10:28 AMKShivendu
01/10/2023, 10:30 AM