# ktor

Tobias Gronbach

04/05/2022, 10:35 PM
Hi, I just managed to deploy my ktor-server-app to heroku. After a lot of struggle it finally worked 🙃. One thing however is not working. I hope somebody can help. I use jwt for authorization. I followed exactly this guide using RS256 (public/private) key pair. Everything worked on localhost but on Heroku public key cannot be found. (More in Thread)
On localhost this configuration worked just fine: jwt { privateKey = "PrivateKey" issuer = "" audience = "" realm = "Access to 'hello'" } But on Heroku I get the following error: com.auth0.jwk.SigningKeyNotFoundException: Failed to get key with kid 346899ed-9189-488f-9011-0ff4b6c08xyz Caused by: java.util.concurrent.ExecutionException: com.auth0.jwk.NetworkException: Cannot obtain jwks from url https://myherokudomain/.well-known/jwks.json What do I have to use for issuer? Anyone?

Aleksei Tirman [JB]

04/06/2022, 10:00 AM
You can use Heroku’s config variables if you know your application’s domain before deployment to reference them in a Ktor application config.