-
-
Notifications
You must be signed in to change notification settings - Fork 417
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
Auth style probing results in AWS Cognito invalid grant #259
Comments
Yes indeed, good idea, we already have "TokenStyle" to "AuthStyle" could work similarly |
Hey guys, I started working on this issue as I urgently need to use traefik-forward-auth with Cognito OIDC. This is my first shot: Obirah@7daa87b However, I'm still a golang newbie and now I'm facing the problem that I'm getting an Do you have any idea what I'm doing wrong? If I get this thing to work, I'll of course happily contribute the change. |
Ok, I solved my problem. My changes are working, the error was caused by my redirect URL (I'm using So, I simply had to add this
I will provide a Pull Request for this issue shortly. |
@Obirah I have your same issue, the callback is http, but I need https, not sure this is a bug happening only with Cognito.
I am trying to expose the traefik dashboard |
For the time being I have modified the code and upload my own image:
Unfortunately I could not find any solution other than hard-code the |
I'm using the following middlewares: Authentication:
HTTPS:
Composition of both:
I can add the last one (the |
Aha, gotcha. Thanks man! |
Traefik Forward Auth appears to be utilising the default behaviour of the underlying Golang oauth2 library (https://github.com/golang/oauth2/blob/master/internal/token.go#L188) and attempts to detect the auth style by sending multiple probes. The probing appears to be incompatible with AWS Cognito and results in an invalid grant (HTTP response 400) on the second auth style probe.
Would it be possible to add support for a new environment variable (https://github.com/thomseddon/traefik-forward-auth/blob/master/internal/provider/generic_oauth.go#L42 - auth style parameter) to set the Golang oauth2 auth style (https://github.com/golang/oauth2/blob/f6687ab2804cbebdfdeef385bee94918b1ce83de/clientcredentials/clientcredentials.go#L106)?
The text was updated successfully, but these errors were encountered: