graphql-devise / graphql_devise

GraphQL interface on top devise_token_auth
MIT License
200 stars 39 forks source link

If expiry was in epoch seconds, it may be out of the range of INT. #253

Open koji-murata-spice opened 1 year ago

koji-murata-spice commented 1 year ago

Describe the bug

For description of the following file. graphql_devise-0.17.1/lib/graphql_devise/types/credential_type.rb

field :expiry, Int, null: false but when expiry is handled in epoch seconds, values after 2038/1/19 12:14:07 (2,147,483,647) are not available.

Also, even after applying the patch and changing the type of expiry to ID, it seems to cause a behavior problem in another place. (I couldn't pinpoint the specific part that is adversely affected...)

Thank you in advance for your confirmation.

00dav00 commented 1 year ago

Hi @koji-murata-spice , thanksr for message, this is an interesting insight. Do you have a project were this is replicated or the log of the error? I'm not sure this is affecting a lot of people just yet, since this kind of tokens are short lived. For example the default expiration time for DTA is 2 weeks.