[flutter_appauth][flutter_appauth_platform_interface] Add support for proxy redirect URLs#652
Open
luis901101 wants to merge 5 commits into
Open
[flutter_appauth][flutter_appauth_platform_interface] Add support for proxy redirect URLs#652luis901101 wants to merge 5 commits into
luis901101 wants to merge 5 commits into
Conversation
…s and calls for consistency.
- 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
Author
|
This PR fixes #651 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for proxy redirect URLs
What this PR does
Adds an optional
proxyRedirectUrlparameter toAuthorizationRequest,AuthorizationTokenRequest, andTokenRequest. 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
proxyRedirectUrlis set:redirect_uriin the authorization request.redirectUrl(the app's custom-scheme deep link) is still used by AppAuth to intercept the browser callback.proxyRedirectUrlis also sent asredirect_uriduring 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
proxyRedirectUrlis not set, behaviour is identical to before.