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

Can not sign up and login porter #1936

Open
2 tasks
finalha opened this issue Apr 21, 2022 · 2 comments
Open
2 tasks

Can not sign up and login porter #1936

finalha opened this issue Apr 21, 2022 · 2 comments

Comments

@finalha
Copy link

finalha commented Apr 21, 2022

Description

I can not sign up and login porter with docker

Location

  • [ chrome and firefox] Browser
  • CLI
  • API

Steps to reproduce

I used the command below:

`docker volume rm porter_sqlite

docker volume create porter_sqlite

docker run \
--name porter-test \
--mount type=volume,source=porter_sqlite,target=/sqlite,readonly=false \
-e REDIS_ENABLED=false \
-e SQL_LITE_PATH=/sqlite/porter.db \
-e WELCOME_FORM_WEBHOOK=https://www.qikqiak.com \
-e DISABLE_ALLOWLIST=true \
-p 8080:8080 \
-d porter1/porter:latest`

The container is OK and I can go into it
docker exec -it porter-test sh
Get the env below:
/ # env
COOKIE_SECRETS=secret
DISABLE_ALLOWLIST=true
HOSTNAME=156ed79cafd2
DEBUG=false
SHLVL=1
HOME=/root
SERVER_TIMEOUT_WRITE=10s
ADMIN_INIT=false
REDIS_ENABLED=false
SQL_LITE=true
WELCOME_FORM_WEBHOOK=https://www.qikqiak.com
SERVER_TIMEOUT_READ=5s
TERM=xterm
SERVER_TIMEOUT_IDLE=15s
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
SQL_LITE_PATH=/sqlite/porter.db
STATIC_FILE_PATH=/porter/static
PWD=/
SERVER_PORT=8080

But when I access the ${IP}:8080 and sign up or sign in, the issues show that:
{"level":"info","latency":38.852622,"status":200,"method":"POST","url":"/api/login","time":"2022-04-21T08:10:16Z"}
{"level":"warn","internal_error":"stored cookie was not authenticated","external_error":"Forbidden","method":"GET","url":"/api/users/current","time":"2022-04-21T08:10:16Z"}
{"level":"info","latency":43.694847,"status":200,"method":"POST","url":"/api/login","time":"2022-04-21T08:12:10Z"}
{"level":"warn","internal_error":"stored cookie was not authenticated","external_error":"Forbidden","method":"GET","url":"/api/users/current","time":"2022-04-21T08:12:10Z"}
{"level":"info","latency":38.12641,"status":200,"method":"POST","url":"/api/login","time":"2022-04-21T08:12:15Z"}
{"level":"warn","internal_error":"stored cookie was not authenticated","external_error":"Forbidden","method":"GET","url":"/api/users/current","time":"2022-04-21T08:12:15Z"}

How can I fix it?

@kincjf
Copy link

kincjf commented May 18, 2022

I am also having the same problem

docker run --mount type=volume,source=porter_sqlite,target=/sqlite,readonly=false -e REDIS_ENABLED=false -e SQL_LITE_PATH=/sqlite/porter.db -e WELCOME_FORM_WEBHOOK="http://localhost:8080/" -e SQL_LITE=true -p 8080:8080 -e DISABLE_ALLOWLIST=true -d porter1/porter:latest

I was able to log in successfully (it didn't go well. I happened to be successful), but I can't register on github.

when click github register btn at project add page => return: { error: An internal error occurred. }
http://localhost:8080/api/integrations/github-app/install?redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Fonboarding%2Fsource

I thought there was a problem with the lack of a domain name, so I tried it on ec2 as well. But login doesn't work in ec2
sudo docker run --mount type=volume,source=porter_sqlite,target=/sqlite,readonly=false -e REDIS_ENABLED=false -e SQL_LITE_PATH=/sqlite/porter.db -e WELCOME_FORM_WEBHOOK="http://ec2-54-159-227-204.compute-1.amazonaws.com:8080" -e SQL_LITE=true -e DISABLE_ALLOWLIST=true -p 8080:8080 -d porter1/porter:latest

@wizpresso-steve-cy-fan
Copy link

It seems like Porter expected you to use HTTPS. Try to use nginx and a self signed signature and then forward the proxy in

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

3 participants