Twilio JWT access token
I ran into an issue with Twilio’s token. Namely, when the app is in the background, for some time, and (while in the background) it goes into the Twilio’s 2 minute range for the token expiry – so it is after the two minutes before token expires – the conversationsClientTokenWillExpire
and conversationsClientTokenExpired
are not triggered, and problems arise, because my Twilio conversation doesn’t work any more. Is there some kind of hook in the lifecycle that will trigger if at any point the token has expired, as opposed to the token being at 2 minutes prior to expiry, or the very monent in which the token has expired? If not, which function can I use to decode the JWT token and compare it to the present epoch time? Cheers everyone….