# Signing JWT Token in Rule with Tenant's Private Key

**URL:** <https://community.auth0.com/t/signing-jwt-token-in-rule-with-tenants-private-key/43506>\
**Category:** Get Help\
**Tags:** jwt, rules\
**Created:** [May 23, 2020, 9:36am UTC](https://community.auth0.com/t/signing-jwt-token-in-rule-with-tenants-private-key/43506 "2020-05-23T09:36:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![calqulate](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/calqulate/32/19295_2.png) [@calqulate](https://community.auth0.com/u/calqulate)\
**Post date:** [May 23, 2020, 9:36am UTC](https://community.auth0.com/t/signing-jwt-token-in-rule-with-tenants-private-key/43506/1 "2020-05-23T09:36:09Z")

</div>

Hello,

In the Redirect from Rule scenario, I understood that we need to sign the JWT token containing information being passed to the SPA. Must we create our own private/public key pair to do so, or can we use the existing Tenant’s private key to sign the token with?

Thank you

---

<div class="post-metadata">

**Author:** ![thameera](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/thameera/32/13430_2.png) [@thameera](https://community.auth0.com/u/thameera)\
**Post date:** [May 24, 2020, 2:09am UTC](https://community.auth0.com/t/signing-jwt-token-in-rule-with-tenants-private-key/43506/2 "2020-05-24T02:09:11Z")

</div>

Hey @calqulate, the tenant’s private key cannot be accessed for this, so you need to either use your own key pair (in case of RS256) or your own secret (in case of HS256).

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [May 25, 2020, 7:14am UTC](https://community.auth0.com/t/signing-jwt-token-in-rule-with-tenants-private-key/43506/3 "2020-05-25T07:14:46Z")

</div>

Thanks for providing that knowledge @thameera!

---

<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:** [June 9, 2020, 7:14am UTC](https://community.auth0.com/t/signing-jwt-token-in-rule-with-tenants-private-key/43506/4 "2020-06-09T07:14:50Z")

</div>

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