diff --git a/src/main/events/helpers/validators.ts b/src/main/events/helpers/validators.ts index e3163aff..f3c9d844 100644 --- a/src/main/events/helpers/validators.ts +++ b/src/main/events/helpers/validators.ts @@ -12,8 +12,3 @@ export const downloadSourceSchema = z.object({ }) ), }); - -export const refreshTokenSchema = z.object({ - accessToken: z.string(), - expiresIn: z.number(), -}); diff --git a/src/main/services/hydra-api.ts b/src/main/services/hydra-api.ts index 776021ea..56caab8b 100644 --- a/src/main/services/hydra-api.ts +++ b/src/main/services/hydra-api.ts @@ -36,9 +36,7 @@ export class HydraApi { refreshToken: this.userAuth.refreshToken, }); - const { accessToken, expiresIn } = refreshTokenSchema.parse( - response.data - ); + const { accessToken, expiresIn } = response.data; const tokenExpirationTimestamp = now.getTime() + expiresIn - this.EXPIRATION_OFFSET_IN_MS;