# Why does the token change when private key is entered in verify signature?

**URL:** <https://community.auth0.com/t/why-does-the-token-change-when-private-key-is-entered-in-verify-signature/140334>\
**Category:** JWT.io\
**Tags:** jwt, api\
**Created:** [August 2, 2024, 7:36pm UTC](https://community.auth0.com/t/why-does-the-token-change-when-private-key-is-entered-in-verify-signature/140334 "2024-08-02T19:36:02Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [August 5, 2024, 9:21pm UTC](https://community.auth0.com/t/why-does-the-token-change-when-private-key-is-entered-in-verify-signature/140334/3 "2024-08-05T21:21:43Z")

</div>

Hey there @vivaladata welcome to the community!

Thanks for the detailed description - Not sure how much I can help, but the behavior you’re describing is odd indeed 🤔 The JWT should only be _signed_ using the private key, not verified.

[jwt.io](http://jwt.io) is be able to verify an RS256 jwt by just pasting it into the “Encoded” field - No other action is required:

> [@How is JWT.io able to validate signatures](https://community.auth0.com/t/how-is-jwt-io-able-to-validate-signatures/122194/2):
>
> Hey @elias.nithin , [JWT.io](http://JWT.io) figures out the JWKS endpoint of the Identity Provider that issued the token, which will include the X.509 certificate that can be used to validate the signature. The rough algorithm for this would be: Find the iss property of the JWT payload, which usually indicates the issuer’s URL. Read the openid-configuration JSON of issuer by appending /.well-known/openid-configuration. For example, if the issuer is https://example.auth0.com/, the URL to look would be https://…

It’s hard to know what could be going on with the API you are attempting to pass the JWT to, but to my knowledge all [validation libraries](https://auth0.com/docs/secure/tokens/json-web-tokens/validate-json-web-tokens#third-party-libraries) work this same way.

---

_[View the full topic](https://community.auth0.com/t/why-does-the-token-change-when-private-key-is-entered-in-verify-signature/140334)._
