I am trying to implement websockets in fastapi. I am sendihng the jwt token correctly. And also able to parse it using parse_jwt_without_signature_verification. The payload contains the session Handle. I could not fidn a way to get the session and the user form that. Any help would be appreicated.
r
rp_st
10/02/2023, 1:55 PM
hey @dekode the user ID is equal to the
sub
claim in the payload.
If you want to get info about the session, you can use the sessionHandle and call Session.getSessionInformation on the backend. But note that this will call the core and is an expensive operation.
d
dekode
10/02/2023, 1:56 PM
Yes, I saw that after experimenting. Thanks. I am using the sub
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).