https://supertokens.com/ logo
jwt validity
l

lavrd

03/17/2023, 8:28 AM
Hi, my current problem that I can't integrate SuperTokens and Centrifugo based on JWT auth. I have enabled JWT session and in one handler printed token from valid session, then I past it to https://jwt.io/ and it says that: "looks like your JWT signature is not encoding correctly using base64url (note that padding ("=") must be omitted)" and says that signature is invalid. Is is okay?
r

rp

03/17/2023, 8:32 AM
hey @lavrd how are you getting the JWT?
l

lavrd

03/17/2023, 8:35 AM
i am using Go and your official library, so in http handler i have following code:
ss := session.GetSessionFromRequestContext(r.Context())
fmt.Println(ss.GetAccessToken())
r

rp

03/17/2023, 8:35 AM
right. So that's the access token for our session, not the JWT
to get the JWT, you need to read
session.GetAccessTokenPayload()["jwt"]
l

lavrd

03/17/2023, 8:39 AM
thanks! i will try to continue this integration