# Authenticate on another server using nakama credentials

**URL:** https://forum.heroiclabs.com/t/authenticate-on-another-server-using-nakama-credentials/3487
**Category:** Game Design
**Created:** [February 3, 2023, 8:51pm UTC](https://forum.heroiclabs.com/t/authenticate-on-another-server-using-nakama-credentials/3487 "2023-02-03T20:51:19Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![j3-prana](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/j3-prana/32/409_2.png) [@j3-prana](https://forum.heroiclabs.com/u/j3-prana)
#### Post date: [February 3, 2023, 8:51pm UTC](https://forum.heroiclabs.com/t/authenticate-on-another-server-using-nakama-credentials/3487/1 "2023-02-03T20:51:19Z")

</div>

I would like to deploy a download server, to allow download of large files like unity addressables for instance 🙂  
The client is already authenticated on nakama, so I would to reuse the credentials for authenticating to the download server also. Is this a valid use case? and is there some kind or recommandations to know what kind of informations the client should send to the server, and then how the server validates it through nakama?  
regards

---

<div class="post-metadata">

### Author: ![ftkg](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/ftkg/32/1180_2.png) [@ftkg](https://forum.heroiclabs.com/u/ftkg)
#### Post date: [February 7, 2023, 1:31pm UTC](https://forum.heroiclabs.com/t/authenticate-on-another-server-using-nakama-credentials/3487/2 "2023-02-07T13:31:22Z")

</div>

Hello,

you can try to authenticate download requests through your external server by validating with a Nakama RPC using a runtime authenticate function ([Nakama: Function Reference | Heroic Labs Documentation](https://heroiclabs.com/docs/nakama/server-framework/go-runtime/function-reference/#Authenticate)). This can be achieved with a server to server call where you would pass the client credentials ([Nakama: Server Runtime Examples | Heroic Labs Documentation](https://heroiclabs.com/docs/nakama/server-framework/runtime-examples/#server-to-server)) to the authentication RPC.

---

<div class="post-metadata">

### Author: ![dela](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/dela/32/1489_2.png) [@dela](https://forum.heroiclabs.com/u/dela)
#### Post date: [February 10, 2023, 8:56am UTC](https://forum.heroiclabs.com/t/authenticate-on-another-server-using-nakama-credentials/3487/3 "2023-02-10T08:56:43Z")

</div>

I had a similar case and solved it with an unconventional approach so to say. Since i trust the download server and own the full code base, i share the JWT secret defined in local.yml. This way i can verify the JWT on the download server (passed by the client via Authorization Header) without anything special.
