# A Logical Hurdle Relating to JWT Signing

**URL:** <https://community.auth0.com/t/a-logical-hurdle-relating-to-jwt-signing/60719>\
**Category:** Get Help\
**Created:** [April 7, 2021, 6:43pm UTC](https://community.auth0.com/t/a-logical-hurdle-relating-to-jwt-signing/60719 "2021-04-07T18:43:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bryan.li](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/bryan.li/32/27505_2.png) [@bryan.li](https://community.auth0.com/u/bryan.li)\
**Post date:** [April 7, 2021, 6:43pm UTC](https://community.auth0.com/t/a-logical-hurdle-relating-to-jwt-signing/60719/1 "2021-04-07T18:43:42Z")

</div>

I’ve worked with JWT but suddenly I’m stuck in this logical wall

Since https://YOUR\_DOMAIN/.well-known/jwks.json is public, anyone that can guess your domain could theoretically get to it (e.g. through the Auth0 sign in page that doesn’t have custom domain).

Wouldn’t that person have access to the signing key, then can proceed to create a fake JWT?

@dan.woda

---

<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:** [April 7, 2021, 7:13pm UTC](https://community.auth0.com/t/a-logical-hurdle-relating-to-jwt-signing/60719/3 "2021-04-07T19:13:54Z")

</div>

Hi @bryan.li,

I imagine others have had this same question. Thanks for moving this to a public topic. 😄

The keys available from the `/.well-known/jwks.json` endpoint are the **public keys** for your tenant. [This endpoint is standardized as part of the OAuth 2.0 framework.](https://tools.ietf.org/html/rfc8414)

If you are using an _asymmetric_ signing algo like RS256, JWT tokens are signed with a **private key** (secret to the auth server) and applications consuming the tokens can verify the signature with a **public key** (available via the endpoint).

Applications consuming the tokens can use the /.well-known/jwks.json endpoint to dynamically request the public key that corresponds to the private key currently in use. This allows your application to always have access to an up-to-date public key, among other things.

If you want to dig in deeper, this blog post helps to demystify RS256 and JWKS:  
[https://auth0.com/blog/navigating-rs256-and-jwks/](https://auth0.com/blog/navigating-rs256-and-jwks/)

Hope that clears things up!

---

<div class="post-metadata">

**Author:** ![bryan.li](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/bryan.li/32/27505_2.png) [@bryan.li](https://community.auth0.com/u/bryan.li)\
**Post date:** [April 8, 2021, 12:14am UTC](https://community.auth0.com/t/a-logical-hurdle-relating-to-jwt-signing/60719/4 "2021-04-08T00:14:07Z")

</div>

> [@dan.woda](#):
>
> Applications consuming the tokens can use the /.well-known/jwks.json endpoint to dynamically request

Thanks, problem solved… it’s the asymmetric signing that threw me off because I kept thinking I need to have a secret key in the env to properly decode the JWT.

---

<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:** [April 23, 2021, 12:14am UTC](https://community.auth0.com/t/a-logical-hurdle-relating-to-jwt-signing/60719/5 "2021-04-23T00:14:58Z")

</div>

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