title: keycloak provides different issuer for frontend and backend
body: <p>I am new to keycloak, I am using keycloak for both frontend and backend application but I am getting the different issuer in the token generated by keycloak when decoded in jwt.io.</p>
  
  <p><strong>Front end:</strong></p>
  
  <ul>
  <li>the issuer is the same as the base URL of the frontend application</li>
  <li>For example:
  
  <blockquote>
    <p>If the front-end URL is <a href="https://example.org/portal" rel="nofollow noreferrer">https://example.org/portal</a> then the issuer is the same as <a href="https://example.org/auth" rel="nofollow noreferrer">https://example.org/auth</a></p>
  </blockquote></li>
  </ul>
  
  <p><strong>Request via postman:</strong></p>
  
  <ul>
  <li>the issuer is the internal DNS name </li>
  </ul>
  
  <p>I have tried below ways,</p>
  
  <ol>
  <li>Proxy redirection(With preserve host) - Which generates the issuer with frontend base url.</li>
  <li>Proxy redirection without preserving host - Which expects the private DNS to be resolved at front end application </li>
  <li>Played around the keycloak configuration - updated frontendUrl to <a href="https://example.org/auth" rel="nofollow noreferrer">https://example.org/auth</a> and forceBackendUrlToFrontendUrl to true which resulted in the same issuer both the backend and frontend but no hostname like https:/auth/relam/external(Refer #2 in reference).</li>
  </ol>
  
  <p><strong>Expected outcome:</strong></p>
  
  <ul>
  <li>I need the private DNS to be issuer it both the request from frontend and backend(for now it works direct backend request)</li>
  </ul>
  
  <p>Thanks in advance.</p>
  
  <p><strong>Reference</strong> </p>
  
  <ol>
  <li><a href="https://github.com/keycloak/keycloak-community/blob/master/design/hostname-default-provider.md" rel="nofollow noreferrer">https://github.com/keycloak/keycloak-community/blob/master/design/hostname-default-provider.md</a></li>
  <li>Code block</li>
  </ol>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;spi name="hostname"&gt;
   &lt;default-provider&gt;fixed&lt;/default-provider&gt;
   &lt;provider name="fixed" enabled="true"&gt;
    &lt;properties&gt;
     &lt;property name="frontendUrl" value="https://example.org/auth"/&gt;
     &lt;property name="forceBackendUrlToFrontendUrl" value="true"/&gt;
    &lt;/properties&gt;
   &lt;/provider&gt;
  &lt;/spi&gt;</code></pre>
  </div>
  </div>
  </p>