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

[Fastboot] Doesn't allow arbitrary exp date #250

Closed
musaffa opened this issue Aug 24, 2018 · 1 comment
Closed

[Fastboot] Doesn't allow arbitrary exp date #250

musaffa opened this issue Aug 24, 2018 · 1 comment

Comments

@musaffa
Copy link

musaffa commented Aug 24, 2018

Ember runloop's later function used in jwt authenticator expects 32 bit signed integer in node.js environment as its param. If 32 bit signed integer limit is exceeded, then a TimeoutOverflowWarning: [num] does not fit into a 32-bit signed integer error is triggered that never stops.

Max number allowed in 32 bit signed integer = 2^31 - 1 = 2,147,483,647

2,147,483,647 / (24 * 60 * 60 * 1000) ~ 24.855 days. Currently, exp date should be less than 25 days in Fastboot settings.

Here's a sample app that demonstrates the issue. After running the server, click sign in. Now you will see a sign out link. Reload the browser and have a look at the terminal.

@musaffa musaffa changed the title [] [Fastboot] Doesn't allow arbitrary exp date Aug 24, 2018
@fenichelar
Copy link
Owner

I'm not sure that there is anything to do in this library other than maybe add a warning in the documentation. However, 25 days is quite a long time for a JWT to be valid.... typical values are measured in minutes.

I'm not sure why Ember.later expects a 32 bit signed integer in a Node.js library, but maybe open an issue there to see if that can be changed because Node.js uses double precision floats under the hood.

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

No branches or pull requests

2 participants