fix: Expiration time claim ('exp') must be a numeric value

This commit is contained in:
peaklabs-dev
2025-01-06 21:08:22 +01:00
parent 126e5ff57a
commit deec885fd9

View File

@@ -51,6 +51,7 @@ function generateGithubToken(GithubApp $source, string $type)
$algorithm = new Sha256;
$tokenBuilder = (new Builder(new JoseEncoder, ChainedFormatter::default()));
$now = CarbonImmutable::now()->setTimezone('UTC');
$now = $now->setTime($now->format('H'), $now->format('i'), $now->format('s'));
$jwt = $tokenBuilder
->issuedBy($source->app_id)