title: why is keycloak removing the SSL in the redirect uri?
body: <p><strong><em>We have a simple requirement where:</em></strong> 
  <strong>PS</strong>: https:/ === https://</p>
  
  <p>When user hits <em>https:/company_landing.company.com</em> , they should be redirected to keycloak login page (at <em>https:/ourcompany-keycloak.company.com</em>). User enters his/her keycloak login credentials. Upon successful login to keycloak , they will be presented to the company_landing page. </p>
  
  <p><strong><em>The trouble is :</em></strong> </p>
  
  <p>When User types - <strong>https:/company_landing.company.com</strong></p>
  
  <p>Keycloak tries to bring up the landing page but gives 500 Internal server error and says "Incorrect redirect uri" and in the browser I see this: </p>
  
  <p>https:/ourcompany-keycloak.company.com/auth/realms/realm1/tokens/login?client_id=company_dev&amp;state=aaaafffff-559d-4312-a8be-123412341234&amp;<strong>redirect_uri=http%3A%2F%2Fcompany_landing.company.com%3A8081%2F%3Fauth_callback%3D1</strong></p>
  
  <p>If you observe the redirect uri above, I think the problem is that instead of https the redirect uri starts with http and http:/company-landing.company.com doesn't exist. </p>
  
  <p><strong><em>Settings:</em></strong> 
  <em>keycloak settings:</em> - </p>
  
  <p><em>Realm --> settings --> login : Require SSL</em> = all Requests (tried with "external" also)</p>
  
  <p><em>Applications-->realm1-->settings-->Redirect URI</em> = <a href="https://company_landing.company.com/" rel="noreferrer">https://company_landing.company.com/</a>*</p>
  
  <p><em>AWS load balancer:</em> 
  Port config: 443(https) forwarding to 8443</p>
  
  <p>I am confused as to why it is stripping the SSL? The above works fine when testing on local environment(probably because its <a href="http://localhost" rel="noreferrer">http://localhost</a>) but this always gives an invalid redirect url when trying to access any link that is ssl encrypted. </p>
  
  <p>-mm</p>