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

Too many redirects vouch nginx on same server. #179

Closed
groundswel opened this issue Nov 20, 2019 · 4 comments
Closed

Too many redirects vouch nginx on same server. #179

groundswel opened this issue Nov 20, 2019 · 4 comments
Labels

Comments

@groundswel
Copy link

Sorry but I am also new to the entire authentication field but I am getting a too many redirect errors. My vouch and nginx servers are running in the same box. The goal is to authenticate a user via vouch and then nginx will let the user go to any url served by nginx as proxy. My nginx and vouch config is here https://gist.github.com/groundswel/ed298d078105009dd6946c67bc457050

I am trying through chrome and I get redirected to the Cognito login page correctly. I am able to login but then chrome throw up this error:

This page isn’t working34.224.17.108 redirected you too many times.
Try clearing your cookies.
ERR_TOO_MANY_REDIRECTS

I tried to clear cookies and use incognito window without any success.

Appreciate any help.

@artagel
Copy link
Contributor

artagel commented Nov 20, 2019

Please follow the directions in the readme about the info to provide for help.
A quick look, and I think your callback url is incorrect.

@groundswel
Copy link
Author

Thanks for your response. May I know why the callback url is wrong and what it should be? I want user to be redirected to that url after successful login. I tried to explicitly define the proxy block in Nginx.conf (see commented lines) to proxy the request to a backend server but it still gives me too many redirect errors. Please let me know if there is additional information I can provide to help troubleshoot this issue.

@artagel
Copy link
Contributor

artagel commented Nov 20, 2019

Check the examples, it should be your vouch url. That’s how Vouch takes the next steps to validate you and issue the cookie. Then once vouch validates, it sends a 200ok for the /validate request, and then it will allow the request to the downstream app.

@groundswel
Copy link
Author

Thank you that was indeed it. Ultimately I ended up using a Nginx configuration similar to the one described in #64.

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

No branches or pull requests

3 participants