rp
01/11/2022, 5:00 AMAINAR
01/11/2022, 9:49 AMrp
01/11/2022, 9:50 AMAINAR
01/11/2022, 9:51 AMrp
01/11/2022, 9:51 AMrp
01/11/2022, 9:52 AMsmoleniuch
01/11/2022, 1:37 PMRohan Kulkarni | Developer
01/11/2022, 4:51 PMrp
01/11/2022, 4:51 PMuser
01/11/2022, 6:05 PMrp
01/11/2022, 7:04 PMaschepis
01/12/2022, 3:14 AMrp
01/12/2022, 4:02 AMrp
01/12/2022, 4:03 AMaschepis
01/12/2022, 12:48 PMaschepis
01/12/2022, 12:48 PMrp
01/12/2022, 12:50 PMaschepis
01/12/2022, 12:50 PMaschepis
01/12/2022, 12:51 PMsupertokens.Init
rp
01/12/2022, 12:51 PMaschepis
01/12/2022, 12:51 PMrp
01/12/2022, 1:25 PMsession.CreateJWT(map[string]interface{}{
"customKey1": "customValue1",
"customKey2": "customValue2",
// other JWT claims
}, nil)
The second param is the validity in seconds. By default, it is the access token lifetimes + 30 seconds. But if you want it really long, you can set it to some 100 years (in second) or something.. This is the function signature: https://pkg.go.dev/github.com/supertokens/supertokens-golang@v0.3.5/recipe/session#CreateJWT
Then you can follow these docs for verification of JWT in your APIs: https://supertokens.io/docs/thirdpartyemailpassword/common-customizations/sessions/with-jwt/jwt-verificationuser
01/12/2022, 3:58 PMrp
01/12/2022, 3:59 PMBruno Diferente
01/12/2022, 3:59 PMrp
01/12/2022, 3:59 PMBruno Diferente
01/12/2022, 4:00 PMrp
01/12/2022, 4:00 PMrp
01/12/2022, 4:00 PMBruno Diferente
01/12/2022, 4:00 PMBruno Diferente
01/12/2022, 4:00 PM