diff --git a/packages/text-to-speech/src/index.ts b/packages/text-to-speech/src/index.ts index 506ebf22f..d148204c5 100644 --- a/packages/text-to-speech/src/index.ts +++ b/packages/text-to-speech/src/index.ts @@ -232,8 +232,9 @@ export const textToSpeechStreamingHandler = Sentry.GCPFunction.wrapHttpFunction( let claim: Claim try { - jwt.verify(token, process.env.JWT_SECRET) - claim = jwt.decode(token) as Claim + claim = jwt.verify(token, process.env.JWT_SECRET, { + ignoreExpiration: true, + }) as Claim } catch (e) { console.error('Authentication error:', e) return res.status(401).send({ errorCode: 'UNAUTHENTICATED' })