FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    JWT public keys are empty

    Scheduled Pinned Locked Moved
    General Discussion
    2
    4
    443
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      stacey
      last edited by

      I am trying to retrieve the JWT public keys via the api endpoint /api/jwt/public-key. The issue is that the response returns empty.

      {"publicKeys":{}}
      

      When I try to target a specific application id via the endpoint /api/jwt/public-key?applicationId={applicationId}. That call throws an exception (from the logs):

      ERROR io.fusionauth.app.primeframework.error.ExceptionExceptionHandler - An unhandled exception was thrown
      org.primeframework.mvc.PrimeException: The @JSONResponse field [response] in the action [class io.fusionauth.app.action.api.jwt.PublicKeyAction] is null. It cannot be null!
      

      Any insight in what is going on here or how to fix? Did I miss some configuration somewhere? I would have expected at least the default keys to be returned. For reference I am running debian self hosted v1.40.2

      Thanks!

      danD 1 Reply Last reply Reply Quote 0
      • danD
        dan @stacey
        last edited by

        @stacey Have you published any asymmetric keypairs (RSA, EC, etc)?

        FusionAuth by default ships only with HMAC keypairs, and since those are symmetric, they are not published at that endpoint.

        --
        FusionAuth - Auth for devs, built by devs.
        https://fusionauth.io

        S 1 Reply Last reply Reply Quote 0
        • S
          stacey @dan
          last edited by

          @dan I did not initially publish any key pairs. This was part of the problem for sure.

          danD 1 Reply Last reply Reply Quote 1
          • danD
            dan @stacey
            last edited by

            @stacey Great. Did you end up getting it working?

            --
            FusionAuth - Auth for devs, built by devs.
            https://fusionauth.io

            1 Reply Last reply Reply Quote 0
            • First post
              Last post