Open drewby opened 1 year ago
/assign
To confirm, what I need to do is allow the user to define a fixed redirect url in the meta, and if the user also provides a redirect url in the query param, I'll use the redirect url in the query param
@ItalyPaleAle
@SpikeWong I'm ok with that if you want to work on it! Thanks :)
Note that we also have a bunch of work schedule for this middleware for 1.11: #2635
any solution idea or fixing in progress?
Describe the feature
During auth code grant flow, Oauth2 middleware saves the incoming URL at the beginning of the flow. It then redirects to that URL at the end of the flow. However, this incoming URL may be a rewrite at ingress or some other internal cluster URL.
This is where incoming URL is saved: https://github.com/dapr/components-contrib/blob/f2a9e30cddca28d4888475fcf40da1a8ab12ef1b/middleware/http/oauth2/oauth2_middleware.go#LL105C5-L105C37
This feature would allow for control over the redirect at the end of the flow either by providing a fixed redirect in the middleware metadata or by looking for a redirect URL in the the queryString of the incoming request.
Release Note
RELEASE NOTE: ADD Ability to specify redirect after authorization in Oauth2 Middleware.