Fix missing nbf
This commit is contained in:
@@ -45,6 +45,7 @@ final class JwtService
|
|||||||
$now = new DateTimeImmutable();
|
$now = new DateTimeImmutable();
|
||||||
$token = $this->jwtConfig->builder()
|
$token = $this->jwtConfig->builder()
|
||||||
->issuedAt($now)
|
->issuedAt($now)
|
||||||
|
->canOnlyBeUsedAfter($now)
|
||||||
->expiresAt($now->modify("+{$this->accessTtl} seconds"))
|
->expiresAt($now->modify("+{$this->accessTtl} seconds"))
|
||||||
->relatedTo($userId)
|
->relatedTo($userId)
|
||||||
->getToken($this->jwtConfig->signer(), $this->jwtConfig->signingKey());
|
->getToken($this->jwtConfig->signer(), $this->jwtConfig->signingKey());
|
||||||
|
|||||||
Reference in New Issue
Block a user