-
Notifications
You must be signed in to change notification settings - Fork 44
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
Using variable in redirect_uri #179
Comments
Welcome! I don’t recommend doing that. I would dedicate a hostname for Are you setting the redirect uri in the token or letting It may be possible to add a prefix configuration option but I’d have to audit exactly where it’s getting used and how. |
Thanks @travisghansen for this great product and fast responses! I checked a few other auth repos on github, most are stale with no responses to posts in the issues at all. Here is my config token:
I am hoping to add |
Wow! You have quickly grasped the vision! You can set a fqdn/uri as the redirect uri but you’ll have to be aware of and explicitly manage the cookie domains etc. I would suggest to read this if you haven’t already: https://github.com/travisghansen/external-auth-server/blob/master/OAUTH_PLUGINS.md If you cannot run the service without a prefix we can likely get something added but I would need to check several locations to be complete as I support single sign out and other features which expect specific endpoints as well. It would take a minute to audit it all. |
Regarding the prefix, I have nginx ingress in front with below config:
The same ingress-nginx has another protected content:
Instead of "configuration-snippet", can external-auth-server expose an signin endpoint so we don't do multiple redirects? When testing oauth2-proxy, all I need is to use:
Maybe we could do the same here? |
Maybe we could introduce a new env like EAS_RP_PREFIX that defaults to / , but can be changed for using Reverse Proxy with a different prefix such as /auth in my case. For now, I can add another routing rule in ingress-nginx to route /oauth/callback to external-auth-server without stripping the /oauth, but the question remains for the dns name. I tried setting |
Ah I see, currently no, the expectation if that value is set is that it's a full uri, not just a path. You could create distinct tokens for each domain and use server-side tokens + To be clear, I'm not against expanding the feature, it's just not implemented to meet your need currently. |
I am testing external-auth-server behind nginx ingress with path prefix /auth. Ingress will strip out /auth before passing to external-auth-server.
When defining redirect_uri for oidc plugin, is it possible to use variable, eg: $host, for the base URL? The Host header comes in from the Ingress. Also, how to tell external-auth-server that it is running behind the ingress reverse proxy, so the redirect URI will need to be /auth/oauth/callback, instead of /oauth/callback?
The text was updated successfully, but these errors were encountered: