title: Keycloak always redirecting to login page
body: <p>I´m using a keycloak instance to login in the frontend and secure the backend-api. After deployment on a linux machine on aws I faced a issue. I´m getting constantly redirected to the login page by accessing the api with a jwt token. Locally it´s working fine.</p>
  <p>My client is a confidential client. I´m using client_id and _secret to authorize for the token call. The jwt token is valid and sucessfully generated.
  My implementation of the api works with expressJs and the keycloak-nodejs-connector:</p>
  <pre><code>    keycloakConfig = {
          serverUrl: 'https://keycloak.myserver.com/auth',
          realm: 'examplerealm',
          clientId: 'ui-client'
      };
  
     public init() {
          if (this.keycloak) {
              console.warn(&quot;Trying to init Keycloak again!&quot;);
              return this.keycloak;
          }
          else {
              console.log(&quot;Initializing Keycloak...&quot;);
              const memoryStore = new session.MemoryStore();
              // @ts-ignore
              this.keycloak = new Keycloak({ store: memoryStore }, this.keycloakConfig );
              return this.keycloak;
          }
      }
  </code></pre>
  <p>I could imagine that it is dependent on the current https setting. My nodejs api provides a endpoint for http and https (locally with a self signed certificate). On the server, where keycloak is running, I added a letsencrypt certificate with certbot and everything looks fine in the browser.
  Keycloak is started with the docker-container jboss/keycloak.</p>
  <p>I´m curious to figure out my current issue and help is very appreciated :slight_smile: Let me know, if I missed to add necessary informations.
  Thanks in advance.
  Dominik</p>