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
rp_st
03/26/2024, 11:31 AM
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
edistra
03/28/2024, 9:06 AM
Thanks for your detailed answer.
Is nest_asyncio.apply() mandatory out of FastAPI implementation ?
r
rp_st
03/28/2024, 9:07 AM
which step in the setup is that again? I don't quite recall
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).