diff --git a/packages/insomnia-app/app/ui/components/editors/auth/o-auth-2-auth.tsx b/packages/insomnia-app/app/ui/components/editors/auth/o-auth-2-auth.tsx index a0be30edf..d4f286788 100644 --- a/packages/insomnia-app/app/ui/components/editors/auth/o-auth-2-auth.tsx +++ b/packages/insomnia-app/app/ui/components/editors/auth/o-auth-2-auth.tsx @@ -299,19 +299,22 @@ const renderIdentityTokenExpiry = (token?: Pick) = return; } - const { exp } = JSON.parse(decodedString); - - if (!exp) { - return '(never expires)'; + try { + const { exp } = JSON.parse(decodedString); + if (!exp) { + return '(never expires)'; + } + const convertedExp = convertEpochToMilliseconds(exp); + return ( + + (expires + ) + + ); + } catch (error) { + console.error(error); + return ''; } - - const convertedExp = convertEpochToMilliseconds(exp); - return ( - - (expires - ) - - ); }; const renderAccessTokenExpiry = (token?: Pick) => {