Skip to content

Add injectable URL opener and unit tests for OIDExternalUserAgentIOSCustomBrowser - #984

Merged
w-goog merged 5 commits into
masterfrom
codegen/pr981-url-opener-seam
Nov 2, 2026
Merged

w-goog merged 5 commits into
masterfrom
codegen/pr981-url-opener-seam

Conversation

@w-goog

@w-goog w-goog commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up to #981.

OIDExternalUserAgentIOSCustomBrowser called UIApplication.sharedApplication directly, so -presentExternalUserAgentRequest:session: was untestable. (The iOS unit test target has no host app, so the completion handler will never fire)

Functional-programming-enjoyer added DI so that the behaviour in #981 is testable:

  • OIDExternalUserAgentIOSCustomBrowserURLOpener, a two-method protocol to which UIApplication can conform.
  • A URLOpener property and a new designated initializer initWithURLTransformation:canOpenURLScheme:appStoreURL:URLOpener:.
  • UnitTests/OIDExternalUserAgentIOSCustomBrowserTests.m (iOS only):

@w-goog
w-goog requested a review from camden-king October 20, 2026 23:40
Comment thread AppAuth.xcodeproj/project.pbxproj Resolved
@w-goog
w-goog requested a review from camden-king October 30, 2026 22:45
@w-goog
w-goog merged commit 3b54371 into master Nov 2, 2026
16 checks passed
@w-goog
w-goog deleted the codegen/pr981-url-opener-seam branch November 2, 2026 21:10
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