Hi, I'm experiencing a problem with the get_user_by_id method from supertokens_python.recipe.thirdparty.syncio.
When I access this API route, I get the error message "Initialisation not done. Did you forget to call Supertokens.init". But the rest of the app is working fine (also with login/ logout etc., acccessing the session). Is there something I need to change for the API view?
Copy code
@method_decorator(verify_session(), name='dispatch')
class UserIsThirdParty(APIView):
def get(self, request: HttpRequest):
session: SessionContainer = request.supertokens
user_id = session.get_user_id()
user = get_user_by_id(user_id)
...
dominik_90977
02/09/2024, 4:25 PM
I'm currently initialising the Supertokens instance in my settings.py
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).