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

Issue with auth redirect for OAuth authorization in non-docker scheme #212

Closed
evanburrows opened this issue Dec 2, 2020 · 2 comments
Closed

Comments

@evanburrows
Copy link

evanburrows commented Dec 2, 2020

First off thanks for the effort put into this package.

I am using traefik-forward-auth in more than likely a non-standard way. I am deploying to a PaaS and have certain pieces working using the generic-oauth provider. It looks like i am getting authenticated and then it is terminating on the redirect back. Looking at the response it leaves the host empty on the redirect_url. This looks to be the same whether I have AUTH_HOST set or not.

I get the following error returned by the browser

Invalid redirect https:///_oauth did not match one of the registered values

Looking at the it looks like this request is happening during the authorize call going back to my 3rd party OAuth provider. I get a 400 because the host is empty from the redirect_url. Any assistance would be greatly appreciated. Even if I had a way to statically define the callback URL. I have tried setting AUTH_HOST before on the start of the the traefik-forward-auth binary as we well as setting an environment variable. Just looks like it isn't getting picked up for some reason.

Like I mentioned earlier I understand that this use case isn't one that you were planning to target but I would greatly appreciate any assistance in diagnosing to come up with a work around.

/r
Evan

@subdavis
Copy link

This is possibly related to : #217

You need to make sure the traefik-forward-auth service also has the auth middleware for its router. This is counter-intuitive, but may be related to your problem.

@thomseddon
Copy link
Owner

Hi - please could you confirm you if you have the middleware correctly applied to the traefik-forward-auth container, as the docs?

I'm going to close this as there wasn't any follow up from the last response, but please re-open with an extract of your config if this is still an issue

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

No branches or pull requests

3 participants