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

Feature Request : option to skip check on redirect URI #890

Open
kanduvisla opened this issue Nov 29, 2024 · 0 comments
Open

Feature Request : option to skip check on redirect URI #890

kanduvisla opened this issue Nov 29, 2024 · 0 comments

Comments

@kanduvisla
Copy link

My use case

I have a current use case where the redirect_uri I provide is not the same URI I actually use. This is the setup:

  • My App has the custom URL scheme "app://"
  • My Identity provider needs to redirect to "https://www.foo.com", so I set that value as redirect_uri
  • "http://www.foo.com" serves as a proxy and redirects back to "app://"
App --> Identity Provider --> https://www.foo.com --> app://

But: in OIDAuthorizationService::mresumeExternalUserAgentFlowWithURL there is a check in shouldHandleURL that validates if the URI that came back to the App matches with that I have set for redirect_uri in my initial request.

Now my authentication flow is not finishing.

The solution I'd like

It would be nice if there was some kind of configuration option that would allow me to ignore this additional check. For as far as I can tell from the comments, the check is done to "reject URLs that don't match redirect (these may be completely unrelated to the authorization)".

Alternatives I've considered

I've considered the following:

  • Create a fork of the repo and only comment out that one line.
  • Don't use "app://" but Apple's Universal Links, but my client cannot support that (yet?).
  • Create a patch file of this change and patch the checked out source code in my build phase (this is what I do now).

Additional context

I'm not sure if skipping this check is against the specs or if this introduces a security risk, but I guess if you have a MITM attack the redirect_uri cannot be trusted anyways.

@kanduvisla kanduvisla added enhancement triage Issues that need to be triaged labels Nov 29, 2024
@brnnmrls brnnmrls removed the triage Issues that need to be triaged label Dec 5, 2024
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

2 participants