Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom token validity time does not work #19

Open
wasd171 opened this issue Oct 22, 2017 · 3 comments
Open

Custom token validity time does not work #19

wasd171 opened this issue Oct 22, 2017 · 3 comments

Comments

@wasd171
Copy link

wasd171 commented Oct 22, 2017

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

@nickluger
Copy link

Is this fixed? I seem to be able to generate tokens with exp set correctly.

@benseitz
Copy link

Any news?

@grimunit
Copy link

grimunit commented Jul 11, 2018

@benseitz @wasd171 We ended up doing this to get the correct duration: const graphCoolValiditiyDuration = Math.floor(((decoded.exp * 1000) - new Date().getTime()) / 1000);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants