-
Notifications
You must be signed in to change notification settings - Fork 239
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
Authentication cookies not being setted on local environment #1385
Comments
I experiencing exactly the same.
Sign up
Sign in
Additionally, trying to run on macOS is unsuccessful as well: https://github.com/porter-dev/porter/issues/199#issuecomment-999879253 |
I also have the same issue with the docker setup |
Same here with the docker setup. Also happen when setting the env variable WELCOME_FORM_WEBHOOK
|
Hey, if anyone is still experiencing this on a local setup, try visiting the website using http://localhost:8080 or http://127.0.0.1:8080 instead of http://0.0.0.0:8080. Reason being is that the cookies are being set with the secure flag which will only work on HTTPS sites or localhost but not 0.0.0.0. |
I also experienced the issue when I visit the self hosted instance at https://porter.mydomain.com. I also made sure to set the domain in the config 🤔 |
Hi @flobaader, just to confirm you set the URL by setting the env variable server:
url: https://porter.mydomain.com If that's the case, could you share the config for the cookie that's being set when you visit the dashboard? Excluding the actual cookie value. Additionally, if you could make sure the dashboard is returning the |
Hey @abelanger5 yes this is my current config:
The login is successfull, I get the following headers back:
The next requests also sends the cookie back to porter but returns:
|
@flobaader thanks! Just a few comments/questions based on your env and setup:
Let me know if any of that works for you! |
Hi @abelanger5, I tried to deploy the container with and without https, with and without encryption key & cookie secret, also tried different databases. The SQlite setup seems to work since the session database contains some data. The logs of the container show the following lines:
|
Hey @flobaader -- to clarify, are you seeing the above issue of To get around the authorization issue, you can set the environment variable |
@abelanger5 thank you for your response - this fixed my issue! Maybe a few problems are mixed here. Since I played lot with the settings, I have also seen the issue mentioned here. It would be awesome if you could document all the different tweaks that the users have to do in order to selfhost porter. |
I have the same issue, And docker logs: |
Closing this issue, as it should be resolved by one of the fixes documented below. If you have attempted all of these fixes and you're still seeing the error, we can re-open the issue:
|
Hm, I think this is similar to the issue I have. But I couldn't complete registration (well, it did complete) - but I cannot login. I get errors in the console about unauthenticated cookies, but there aren't any cookies at all. When I try to register again, it says the email is already taken, so my account exists.
Response of /login is 200
{"id":1,"email":"[email protected]","email_verified":false}
but is instantly followed by another HTTP request to /api/users/current which gives a similar 403{"error":"Forbidden"}
.I don't know whether I should open a separate issue, but thought I would write under this issue first, if it's maybe a dupe.
Steps were similar: Spun up a LXC container, installing the porter CLI as in the linked guide, run the same command, went to register and got these errors (the first errors were even without any user input at all, just went to :8080 and that was it).
Porter Server Log
Originally posted by @d0x7 in https://github.com/porter-dev/porter/issues/1356#issuecomment-952627230
The text was updated successfully, but these errors were encountered: