Skip to content

[flutter_appauth][flutter_appauth_platform_interface] Add support for proxy redirect URLs - #652

Open
luis901101 wants to merge 5 commits into
MaikuB:masterfrom
luis901101:master
Open

[flutter_appauth][flutter_appauth_platform_interface] Add support for proxy redirect URLs#652
luis901101 wants to merge 5 commits into
MaikuB:masterfrom
luis901101:master

Conversation

@luis901101

Copy link
Copy Markdown

Add support for proxy redirect URLs

What this PR does

Adds an optional proxyRedirectUrl parameter to AuthorizationRequest, AuthorizationTokenRequest, and TokenRequest. This allows apps to work with identity providers that only permit HTTPS redirect URIs by decoupling the URL sent to the provider from the custom-scheme URL used to intercept the callback on-device.

When proxyRedirectUrl is set:

  • It is sent to the identity provider as the redirect_uri in the authorization request.
  • redirectUrl (the app's custom-scheme deep link) is still used by AppAuth to intercept the browser callback.
  • proxyRedirectUrl is also sent as redirect_uri during token exchange so it matches what was used in the authorization request, as required by OAuth 2.0.

Notes:
The proxy responsible for the final redirect must be configured accordingly, but this is out of the scope of this PR.

When proxyRedirectUrl is not set, behaviour is identical to before.

- Improved null safety in the example app's response processing logic.
- Applied minor formatting changes.
… arguments

- Added test case to verify `proxyRedirectUrl` is correctly passed in `TokenRequest` method calls
@luis901101

Copy link
Copy Markdown
Author

This PR fixes #651

@MaikuB

MaikuB commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Thanks for the PR and apologies for the delay on coming to this. At the moment, I'm going to hold off on this for the following reasons

  • This looks like a workaround that strays further away from exposing more on what is officially available with the AppAuth SDKs, which is the primary purpose of the plugin. Note I understand that there's a use case behind the PR and is arguably where a fork is suitable
  • Looks like this PR may have some overlap with this PR since both deal with HTTPs-based redirect URLs
  • I do not have way to test the changes
  • I'd like to see if the AppAuth SDKs can tackle some of the changes. Looks like there is already a related PR at support universal link as redirect url openid/AppAuth-iOS#938

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants