https://supertokens.com/ logo
Title
a

abcdefgh

03/09/2023, 5:00 AM
how to implement verify session middleware in fastapi ? can you provide me a proper code? i want to know how session management works? canu explain in simple language? how to implment session management in fastapi pyhton actually i got error when i try to implement those code
r

rp

03/09/2023, 5:22 AM
hey @abcdefgh we already have docs and a verifySession middleware for fastapi. Please see those. \
a

abcdefgh

03/09/2023, 5:29 AM
i saw that but i got error when i implemented those apis
i worked only backend part
in verifysessionmiddleware @router.post( '/like_comment' ) async def like_comment(self, session: SessionContainer = Depends(verify_session())): user_id = session.get_user_id() print(user_id) return user_id when i applied this it shows me a message unauthorized can you tell me why/
?
r

rp

03/09/2023, 6:51 AM
maybe some misconfig on your end. See this issue please: https://github.com/supertokens/supertokens-website/issues/68
a

abcdefgh

03/09/2023, 7:59 AM
I am not able to solve it
can you help me?