Hello, we're using Supertokens python sdk in an AWS Lambda + FastAPI and it's working great, but now...
e
Hello, we're using Supertokens python sdk in an AWS Lambda + FastAPI and it's working great, but now we'd like to use some supertokens functions outside of the API, like getting user id by email, or managing roles directly from other backend processes. I've noticed it's possible if the init function is called beforehand, how would you refactor the documentation lambda code example so Supertokens can be used outside of FastAPI implementation ? Is there anything else to consider for such usage ?
r
hey @edistra . All you really need to do is init the backend sdk in the other service: - The appInfo config doesn't really matter - You should init the same set of recipes - The API overrides (if any) are not needed - The function overrides (if any) will be needed.
e
Thanks for your detailed answer. Is nest_asyncio.apply() mandatory out of FastAPI implementation ?
r
which step in the setup is that again? I don't quite recall
r
hmm. Im not too sure. You can try it without it and see if it works. I don't think it's required
e
alright, that's what I was thinking as well, thanks for your time
7 Views