Skip to content
This repository has been archived by the owner on Jan 24, 2019. It is now read-only.

skip-provider-button seems to force final redirection url to be / #327

Open
ntdaley opened this issue Nov 27, 2016 · 2 comments
Open

skip-provider-button seems to force final redirection url to be / #327

ntdaley opened this issue Nov 27, 2016 · 2 comments
Labels

Comments

@ntdaley
Copy link

ntdaley commented Nov 27, 2016

When I use -skip-provider-button it always gets redirected after login to /
When I don't it gets redirected after login to the url beforehand.

e.g. I point my browser at https://my-site/some/sub/path
when I have -skip-provider-button, it will end up pointing at https://my-site/
when I don't it will end up pointing at https://my-site/some/sub/path

I have the oauth2_proxy behind an apache server.
I use the following command (of course I've censored/changed some):
oauth2_proxy -provider google -http-address http://:4180 -cookie-expire 1h -client-id XXXXXX -client-secret XXXXXX -cookie-secret XXXXX -email-domain my-site -login-url https://accounts.google.com/o/oauth2/auth?access_type=offline&hd=my-site -upstream http://private-server:80/

Note: I'm using a proper domain name where you see 'my-site' above.

Note: I supplied my own login-url, so I could add the 'hd' parameter to have google only prompt with accounts from the given organization/domain.

@jehiah jehiah added the bug label Mar 29, 2017
@iyerusad
Copy link

I seem to have encountered the same -

I am doing nginx -> oauth2_proxy
which goes to
gollum

This is successful.

However nginx-> oauth2_proxy -> gollum -> omnigollum redirects all traffic to / (so requests to http://mysite.com/edit/home go to http://mysite.com

Does -skip-provider-button=false mean it will prompt to press "login with {provider}" vs just passing user through if they have existing cookie/session?

@drassi
Copy link

drassi commented Apr 2, 2017

I have the same issue, using skip_provider_button=true causes logins to somehow lose track of the "state" GET param on the provider login page, at least for Google.

  • skip_provider_button=false makes state=/<original_path>/ appear in provider login url bar
  • skip_provider_button=true makes state=/ appear instead

Thanks for the 'hd' param tip @ntdaley—this should be the default for the Google provider!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging a pull request may close this issue.

4 participants