# Export JWK from Nakama

**URL:** <https://forum.heroiclabs.com/t/export-jwk-from-nakama/3961>\
**Category:** Runtime Framework\
**Tags:** server-framework, authentication\
**Created:** [June 13, 2023, 12:35pm UTC](https://forum.heroiclabs.com/t/export-jwk-from-nakama/3961 "2023-06-13T12:35:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MWFIAE](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/mwfiae/32/678_2.png) [@MWFIAE](https://forum.heroiclabs.com/u/MWFIAE)\
**Post date:** [June 13, 2023, 12:35pm UTC](https://forum.heroiclabs.com/t/export-jwk-from-nakama/3961/1 "2023-06-13T12:35:37Z")

</div>

Hey everyone! 🙂

We want to use nakama as our one-stop authentication service. As such we have the need for a JWK endpoint that return the information needed to verify the validity of a jwt token generated by nakama in our other services.

Is such an endpoint available? And if not how could I create my own? 🙏

---

<div class="post-metadata">

**Author:** ![sesposito](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/sesposito/32/2594_2.png) [@sesposito](https://forum.heroiclabs.com/u/sesposito)\
**Post date:** [July 11, 2023, 11:02am UTC](https://forum.heroiclabs.com/t/export-jwk-from-nakama/3961/2 "2023-07-11T11:02:40Z")

</div>

Hello @MWFIAE,

An endpoint for JWT validation is not available, but you can create your own replicating the logic the server users to [validate them](https://github.com/heroiclabs/nakama/blob/master/server/api.go#L476).

Best

---

<div class="post-metadata">

**Author:** ![MWFIAE](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/mwfiae/32/678_2.png) [@MWFIAE](https://forum.heroiclabs.com/u/MWFIAE)\
**Post date:** [July 11, 2023, 11:16am UTC](https://forum.heroiclabs.com/t/export-jwk-from-nakama/3961/3 "2023-07-11T11:16:23Z")

</div>

Yes from what I have gathered the jwts used by nakama for authentication only offer symmetrical encryption, so its impossible to have a jwk for that. Instead one has to generate a priv/pub key pair and use that in a custom rpc to generate a jwt and also use the pub key to generate a jwk that can be used by other services for validation. All in all more effort but seemingly doable
