# BadRequestError: failed to decode JWT (TypeError: encrypted JWTs cannot be decoded)

**URL:** <https://community.auth0.com/t/badrequesterror-failed-to-decode-jwt-typeerror-encrypted-jwts-cannot-be-decoded/97949>\
**Category:** Get Help\
**Tags:** express-openid-connect, sdks-quickstarts\
**Created:** [January 11, 2023, 2:15pm UTC](https://community.auth0.com/t/badrequesterror-failed-to-decode-jwt-typeerror-encrypted-jwts-cannot-be-decoded/97949 "2023-01-11T14:15:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chogster](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/chogster/32/42534_2.png) [@Chogster](https://community.auth0.com/u/Chogster)\
**Post date:** [January 11, 2023, 2:15pm UTC](https://community.auth0.com/t/badrequesterror-failed-to-decode-jwt-typeerror-encrypted-jwts-cannot-be-decoded/97949/1 "2023-01-11T14:15:46Z")

</div>

I am using express-openid-connect library, and I am receiving `BadRequestError: failed to decode JWT (TypeError: encrypted JWTs cannot be decoded)` when redirected back after a successful auth. The token is a JWE, and I’m not sure how to handle this. Does anyone have any experience with this?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [January 20, 2023, 8:39pm UTC](https://community.auth0.com/t/badrequesterror-failed-to-decode-jwt-typeerror-encrypted-jwts-cannot-be-decoded/97949/3 "2023-01-20T20:39:30Z")

</div>

Hi @Chogster,

Welcome to the Auth0 Community!

It sounds like you have an opaque token. See this FAQ:

[https://community.auth0.com/t/why-is-my-access-token-not-a-jwt-opaque-token/31028](https://community.auth0.com/t/why-is-my-access-token-not-a-jwt-opaque-token/31028)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [February 3, 2023, 8:40pm UTC](https://community.auth0.com/t/badrequesterror-failed-to-decode-jwt-typeerror-encrypted-jwts-cannot-be-decoded/97949/4 "2023-02-03T20:40:28Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
