Tony/630 try another webid#41
Merged
Merged
Conversation
…ort a stuck desktop OAuth flow when the user closes the browser window before completing login. Authenticator.cancel() is now idempotent and only tears down the shared callback server when no other flow needs it
…ort a stuck desktop OAuth flow when the user closes the browser window before completing login. Authenticator.cancel() is now idempotent and only tears down the shared callback server when no other flow needs it
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds cancellation support for non-web OAuth authentication flows so callers can abort a pending login and distinguish cancellation from other failures.
Changes:
- Adds
AuthCancelledException,cancelAuthenticate(), and pending-authenticator tracking. - Updates desktop/mobile OAuth cancellation handling to complete the pending flow and close callback servers when appropriate.
- Minor wording cleanup in
pubspec.yaml.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
pubspec.yaml |
Clarifies a dependency-checker comment. |
lib/src/openid/openid_client_io.dart |
Updates Authenticator.cancel() to be idempotent and server-aware. |
lib/solid_auth_client.dart |
Adds public authentication cancellation APIs and maps cancellation errors to AuthCancelledException. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+149
to
+151
| final completer = _requestsByState.remove(state); | ||
| if (completer != null && !completer.isCompleted) { | ||
| completer.completeError(Exception('Flow was cancelled')); |
Comment on lines
+157
to
+158
| if (_requestsByState.isEmpty) { | ||
| final serverFuture = _requestServers.remove(port); |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
srodriguez142857
approved these changes
May 18, 2026
Collaborator
srodriguez142857
left a comment
There was a problem hiding this comment.
All went smoothly in my tests; the functionality is working as expected.
Thanks @tonypioneer.
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.
Pull Request Details
Description
Added cancelAuthenticate() and AuthCancelledException so callers can abort a stuck desktop OAuth flow when the user closes the browser window before completing login.
Related Issues
anusii/solidpod#630
Type of Change
How To Test?
Run RioPod using
tony/630_try_another_webidbranch to test, and follow the steps below.Checklist
make preporflutter analyze lib)dart testoutput or screenshot included in issue #Finalising