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

GitHub login redirect loop if ":80" appears in BASE_URL #2252

Open
paulproteus opened this Issue Jul 21, 2016 · 5 comments

Comments

Projects
None yet
1 participant
@paulproteus
Member

paulproteus commented Jul 21, 2016

I'm currently experiencing a redirect loop where on http://tpcikmmyjjapslvl.sandcats-dev.sandstorm.io/ (a test Sandstorm install I created), whenever I try to log in as the first GitHub user, I get sent to /, and then immediately redirected to /setup. Additionally, login does not seem to be succeeding.

I'll attempt to diagnose but wanted to leave a note that I'm experiencing something weird.

@paulproteus

This comment has been minimized.

Show comment
Hide comment
@paulproteus

paulproteus Jul 21, 2016

Member

OK, my BASE_URL and WILDCARD_HOST used to be:

BASE_URL=http://tpcikmmyjjapslvl.sandcats-dev.sandstorm.io:80
WILDCARD_HOST=*.tpcikmmyjjapslvl.sandcats-dev.sandstorm.io:80

and I was getting this "warning" (perhaps treated as an error?) in /opt/sandstorm/var/log/sandstorm.log:

{"line":"398","file":"oauth_server.js","message":"Error in OAuth Server: redirectUrl (http://tpcikmmyjjapslvl.sandcats-dev.sandstorm.io/setup/user) is not on the same host as the app (http://tpcikmmyjjapslvl.sandcats-dev.sandstorm.io:80/)","time":{"$date":1469070069967},"level":"warn"}

and when I changed my BASE_URL to not have the :80 then the problem resolved itself.

Member

paulproteus commented Jul 21, 2016

OK, my BASE_URL and WILDCARD_HOST used to be:

BASE_URL=http://tpcikmmyjjapslvl.sandcats-dev.sandstorm.io:80
WILDCARD_HOST=*.tpcikmmyjjapslvl.sandcats-dev.sandstorm.io:80

and I was getting this "warning" (perhaps treated as an error?) in /opt/sandstorm/var/log/sandstorm.log:

{"line":"398","file":"oauth_server.js","message":"Error in OAuth Server: redirectUrl (http://tpcikmmyjjapslvl.sandcats-dev.sandstorm.io/setup/user) is not on the same host as the app (http://tpcikmmyjjapslvl.sandcats-dev.sandstorm.io:80/)","time":{"$date":1469070069967},"level":"warn"}

and when I changed my BASE_URL to not have the :80 then the problem resolved itself.

@paulproteus

This comment has been minimized.

Show comment
Hide comment
@paulproteus

paulproteus Jul 21, 2016

Member

I guess tomorrow I will attempt to reproduce this, and then propose a fix. I plan to change things so that install.sh uses port 80 more often, so this is going to start affecting more users.

Member

paulproteus commented Jul 21, 2016

I guess tomorrow I will attempt to reproduce this, and then propose a fix. I plan to change things so that install.sh uses port 80 more often, so this is going to start affecting more users.

@paulproteus paulproteus changed the title from GitHub login redirect loop to GitHub login redirect loop if ":80" appears in BASE_URL Jul 21, 2016

@paulproteus paulproteus self-assigned this Jul 21, 2016

@paulproteus paulproteus reopened this Jul 25, 2016

@paulproteus

This comment has been minimized.

Show comment
Hide comment
@paulproteus

paulproteus Jul 25, 2016

Member

Re-opening because it's not really resolved, just worked-around in install.sh.

Member

paulproteus commented Jul 25, 2016

Re-opening because it's not really resolved, just worked-around in install.sh.

@paulproteus

This comment has been minimized.

Show comment
Hide comment
@paulproteus

paulproteus Jul 25, 2016

Member

Removing milestone for this; the workaround is adequate for the needs expressed in the milestone.

Member

paulproteus commented Jul 25, 2016

Removing milestone for this; the workaround is adequate for the needs expressed in the milestone.

@paulproteus paulproteus removed their assignment Sep 9, 2016

@paulproteus

This comment has been minimized.

Show comment
Hide comment
@paulproteus

paulproteus Sep 9, 2016

Member

Deassigning from myself because there's no evidence I'll fix this anytime soon.

Member

paulproteus commented Sep 9, 2016

Deassigning from myself because there's no evidence I'll fix this anytime soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment