cypht-org / cypht-docker

Legacy Docker image setup files to run Cypht
GNU General Public License v2.0
40 stars 25 forks source link

Failed to Login using docker-compose example #2

Open benyanke opened 6 years ago

benyanke commented 6 years ago

Not sure what's up, but seeing no log messages about failure. When using the specified password, it returns to the login screen with no error.

I'm debugging this as well myself but wanted to put a note here.

benyanke commented 6 years ago

After looking into debugging, it appears I am authenticating successfully, as debug logs state when I set DEBUG_MODE = true.

It appears to be a redirect-after-login issue.

justinvoelker commented 6 years ago

I believe this is only an issue if you follow the docker-compose example directly without using a reverse proxy. Using the sample docker-compose as-is, you must be accessing Cypht via an IP address and specified port. Not sure why, but I think that is where the problem lies.

If you have some sort of reverse proxy setup (such as jwilder/nginx-proxy or traefik) so that you can access Cypht via a domain/subdomain, the problem disappears. At least, I think that is what gets around this issue.

a29er commented 6 years ago

The problem is in cookies. After POST request Cypht responds and in one Set-Cookie header sets and then immediately deletes all hm_{id,login,session} cookies. So the next request there are no cookies at all.

benyanke commented 6 years ago

Is there a mode to run without a proxy, or somewhere I can debug further to resolve it? I'd be happy to PR this if I can get it working, but I'm lost on the actual root cause after several hours.

allanrbo commented 6 years ago

I had changed the docker-compose.yml file to use an alternative host port, and also ran into this problem. When I changed it back to the default port 80, I was able to login.

Razvan0925 commented 5 years ago

For me, setting CYPHT_DISABLE_ORIGIN_CHECK to 1 resolved this problem.

marclaporte commented 8 months ago

The good, the bad and the ugly: We need a Docker expert to guide us!