Hey , I am using supertokens python-flask sdk . I have used decorator verify_session to authorise t...
t
Hey , I am using supertokens python-flask sdk . I have used decorator verify_session to authorise the api . The test case for those api's requests are failing with 401 unauthorised error . I am creating token using the below code provided in the docs and adding necessary roles and permissions from supertokens_python.recipe.jwt.syncio import create_jwt from supertokens_python.recipe.jwt.interfaces import CreateJwtOkResult jwtResponse = create_jwt({ "source": "microservice", # ... extra payload }) if isinstance(jwtResponse, CreateJwtOkResult): jwtStr = jwtResponse.jwt # Send JWT as Authorization header to M2 else: raise Exception("Unable to create JWT. Should never come here.") But with this token the api requests are failing with 401 How do I surpass the authorisation while running test cases ?
Hey @rp_st can you help her
r
hey @Tushar the verify_sesion function is meant for session tokens verification. Not m2m tokens