IBM Worklight Console: Protected Worklight Console in Liberty Server asked to Authetication twice

234 Views Asked by At
  1. I have created a server in liberty and installed IBM Worklight in it.
  2. Everything was working fine till I protect the console.
  3. After protecting the IBM Worklight console the authentication is asked twice.

First Login Screen with URL localhost:9080 enter image description here

After Login Successful.Again the login is being asked with the hostmachines URL 192.168.10.16:9080 enter image description here

My questions are

  1. Why login appears twice?
  2. Why my hostmachine ip is being revealed?
1

There are 1 best solutions below

0
On

You are accessing the console with address localhost, whereas in your code you are either using publicWorklightHosname=192.168.10.16 or while building you are using build for remote machine and then putting in IP of the server.

Here is what you need to do:

  1. Make sure a DNS entry of the hostname is present in the server and client machine
  2. Change the publicWorklightHostname property in worklight.properties file to a proper address eg mymachine.mydomain.com
  3. while building for Remote Server, use the same address as above i.e. mymachine.mydomain.com
  4. redeploy the new war file

Worked perfectly for me.

P.S> I believe you are using local machine, in this case also you can use the machine name in worklight.properties file and make sure that the address you are using is same as the one you used to build. Nonetheless, it doesn;t matter in production or application deployment.