diff --git a/src/get-app-authentication.ts b/src/get-app-authentication.ts index 49075160..519ae318 100644 --- a/src/get-app-authentication.ts +++ b/src/get-app-authentication.ts @@ -10,11 +10,16 @@ export async function getAppAuthentication({ timeDifference?: number; }): Promise { try { - const appAuthentication = await githubAppJwt({ - id: appId, - privateKey, - now: timeDifference && Math.floor(Date.now() / 1000) + timeDifference, - }); + const appAuthentication = timeDifference + ? await githubAppJwt({ + id: appId, + privateKey, + now: timeDifference && Math.floor(Date.now() / 1000) + timeDifference, + }) + : await githubAppJwt({ + id: appId, + privateKey, + }); return { type: "app",