From 8201ca3e5ba1d41b7159c1f1bd7a7cb82853a2ee Mon Sep 17 00:00:00 2001 From: phillipgr4vy <92320120+phillipgr4vy@users.noreply.github.com> Date: Fri, 14 Jun 2024 12:22:33 -0400 Subject: [PATCH] fix: set JWT canOnlyBeUsedAfter to now instead of +1 minute from now (#28) Update JWT canOnlyBeUsedAfter to now instead of +1 minute from now. --- composer.lock | 2 +- lib/Gr4vyConfig.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.lock b/composer.lock index 9b35f05..27da8da 100644 --- a/composer.lock +++ b/composer.lock @@ -4760,4 +4760,4 @@ }, "platform-dev": [], "plugin-api-version": "2.3.0" -} +} \ No newline at end of file diff --git a/lib/Gr4vyConfig.php b/lib/Gr4vyConfig.php index e8d6b5a..69a4592 100644 --- a/lib/Gr4vyConfig.php +++ b/lib/Gr4vyConfig.php @@ -125,7 +125,7 @@ public static function getToken($private_key, $scopes = array(), $embed = array( // Configures the time that the token was issue (iat claim) ->issuedAt($now) // Configures the time that the token can be used (nbf claim) - ->canOnlyBeUsedAfter($now->modify('+1 minute')) + ->canOnlyBeUsedAfter($now)#->modify('+1 minute')) // Configures the expiration time of the token (exp claim) ->expiresAt($now->modify('+1 hour')) // Configures a new claim, called "uid"