graphcool-lib
graphcool-lib copied to clipboard
Custom token validity time does not work
Hi!
Calling .generateNodeToken(nodeId, modelName, time) always results in 1 month period, although function signature suggests it would generate a token with appropriate expiration period https://github.com/graphcool/graphcool-lib/blob/9a5432aa86be3d31c90240679ea05634ac189375/src/index.ts#L81
Is this fixed? I seem to be able to generate tokens with exp set correctly.
Any news?
@benseitz @wasd171 We ended up doing this to get the correct duration: const graphCoolValiditiyDuration = Math.floor(((decoded.exp * 1000) - new Date().getTime()) / 1000);