Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENABLE_REGISTRATION doesn't seem to work, and sign in only works when behind reverse proxy #3

Closed
loof2736 opened this issue Oct 8, 2022 · 8 comments

Comments

@loof2736
Copy link

loof2736 commented Oct 8, 2022

I set ENABLE_REGISTRATION=1, but on the sign in page there is no register button. I created a user with the internal admin API, but when I press the log in button nothing happens. When I put it behind a reverse proxy sign in works fine (Register option still does not show though)

@rubenixnagios
Copy link

same here

@haishanh
Copy link
Owner

haishanh commented Oct 8, 2022

I made a silly mistake, the env var to turn on registration is actually called ENABLE_PUBLIC_REGISTRATION instead of ENABLE_REGISTRATION. I renamed it to make it more precise, but forgot to update the doc :(

And some browsers won't send "Secure" cookie when the website is served locally. Most browsers tend to work with "localhost" (instead of 127.0.0.1 or 0.0.0.0).

Sorry for the inconvenience @loof2736 @rubenixnagios

@tiritibambix
Copy link

Same.
Here's what say the docs:

Cherry uses Secure cookie which only works with HTTPS. It works with "localhost" in some browsers too, so you should try use "localhost:8000" instead of "127.0.0.1:8000" or "0.0.0.0:8000" when running locally, or you will need to setup the reverse proxy and SSL for it. Sorry for the inconvenience at the moment, an environment variable flag may introduced in a future release to turn off Secure cookie.

So I guess we shall :

  1. Be patient untill this changes
    or
  2. Use a reverse proxy.

I'll go with option 1 for now.

@haishanh
Copy link
Owner

haishanh commented Oct 8, 2022

@tiritibambix Which browser are you using? Have you tried access http://localhost:8000 ?

@tiritibambix
Copy link

@tiritibambix Which browser are you using? Have you tried access http://localhost:8000 ?

Hey, thanks for answering. I'm using a chromium based browser called Vivaldi. I did try http://localhost:8000 with no success.

@haishanh
Copy link
Owner

haishanh commented Oct 8, 2022

@tiritibambix In case you have Firefox installed, could you try open http://localhost:8000 with Firefox?

Anyway, I'll add a flag to opt out of secure cookie for people who want to try out locally.

@tiritibambix
Copy link

@haishanh I tried with 3 different browsers: Vivaldi, Brave and Firefox. None of them worked.

I just need cherry to work on my local network though, as I use a VPN tunnel when I'm not home.

@tiritibambix
Copy link

USE_INSECURE_COOKIE is working.

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants