From a3cceb9bc35a1450a6c6bb17a96a0492b3d62029 Mon Sep 17 00:00:00 2001 From: Prashant Date: Mon, 20 Feb 2023 11:53:43 +0530 Subject: [PATCH] don't convert token_expires_in to integer --- lib/devise/token_authenticatable/strategy.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/devise/token_authenticatable/strategy.rb b/lib/devise/token_authenticatable/strategy.rb index 74a17bd..a5f89e2 100644 --- a/lib/devise/token_authenticatable/strategy.rb +++ b/lib/devise/token_authenticatable/strategy.rb @@ -37,7 +37,7 @@ def authenticate! return fail(:invalid_token) unless resource unless token_expires_in.blank? - if Time.now > (resource.authentication_token_created_at + token_expires_in.to_i) + if Time.now > (resource.authentication_token_created_at + token_expires_in) return fail(:expired_token) end end