# Invalid signature in JWT token

**URL:** <https://community.auth0.com/t/invalid-signature-in-jwt-token/168025>\
**Category:** Get Help\
**Tags:** free-trial, login-experience\
**Created:** [January 9, 2025, 12:51pm UTC](https://community.auth0.com/t/invalid-signature-in-jwt-token/168025 "2025-01-09T12:51:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![philipnoblem](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/philipnoblem/32/60933_2.png) [@philipnoblem](https://community.auth0.com/u/philipnoblem)\
**Post date:** [January 9, 2025, 12:51pm UTC](https://community.auth0.com/t/invalid-signature-in-jwt-token/168025/1 "2025-01-09T12:51:29Z")

</div>

Ready to post? 🔍 First, try searching for your answer.  
I have created a mobile app and integrated with auth0 using password less grant type using SMS.  
As part of this i have also created a custom authorization server.

When i am generating token through api request via postman, i am able to get the access token with a valid signature:

But when i am performing the same through auth0 sdk i am getting access token with invalid signature.

It would be great if some one can help me on this issue. Thanks in advance.

Regards,  
Philip Noble

---

<div class="post-metadata">

**Author:** ![vigneshSivasamy](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/vigneshsivasamy/32/60008_2.png) [@vigneshSivasamy](https://community.auth0.com/u/vigneshSivasamy)\
**Post date:** [January 9, 2025, 1:55pm UTC](https://community.auth0.com/t/invalid-signature-in-jwt-token/168025/2 "2025-01-09T13:55:15Z")

</div>

A signature error will most likely occur if the expected algorithm is not used. For example, the application may expect RS256, but you might have configured HS256.

In my private cloud, I have encountered the same error. I had to change the setting to RS256 multiple times to resolve the issue.

You can find the settings under:

**Application Settings → Advanced Settings → OAuth → JSON Web Token Signature Algorithm**

Please share the entire error message; it will be helpful in identifying the issue.

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [January 10, 2025, 10:14pm UTC](https://community.auth0.com/t/invalid-signature-in-jwt-token/168025/4 "2025-01-10T22:14:32Z")

</div>

Hi @philipnoblem

Welcome to the Auth0 Community!

Thank you for posting your question, It’s possible that the access token that Auth0 returns is an opaque token that allows for calls only for the `/userinfo` endpoint. Please check and make sure that your auth0 SDK is adding the audience parameter with the proper API identifier in the request to get the valid access token, not the opaque one.

> **[Access Tokens](https://auth0.com/docs/secure/tokens/access-tokens#opaque-access-tokens)**
>
> Describes how access tokens are used in token-based authentication to allow an application to access an API after a user successfully authenticates and authorizes access.

Thanks  
Dawid

---

<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:** [January 24, 2025, 10:15pm UTC](https://community.auth0.com/t/invalid-signature-in-jwt-token/168025/5 "2025-01-24T22:15:23Z")

</div>

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