Skip to content

Commit

Permalink
fix: set JWT canOnlyBeUsedAfter to now instead of +1 minute from now (#…
Browse files Browse the repository at this point in the history
…28)

Update JWT canOnlyBeUsedAfter to now instead of +1 minute from now.
  • Loading branch information
phillipgr4vy authored Jun 14, 2024
1 parent 0cef7df commit 8201ca3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/Gr4vyConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 8201ca3

Please sign in to comment.