Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 2.1.0
- Removed external browser (Safari) fallback from `OIDExternalUserAgentIOS`. If `ASWebAuthenticationSession` fails to start (e.g., Guided Access is enabled), the authorization flow now fails with an error instead of opening an external browser.

# 2.0.0
- Raise minimum supported iOS version to iOS 12. ([#918](https://github.com/openid/AppAuth-iOS/pull/918))
- Remove deprecated `[UIApplication openURL:]` method to compile with Xcode 16. ([#911](https://github.com/openid/AppAuth-iOS/pull/911))
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ For tvOS, AppAuth implements [OAuth 2.0 Device Authorization Grant

AppAuth supports iOS 12 and above.

iOS 9+ uses the in-app browser tab pattern
(via `SFSafariViewController`), and falls back to the system browser (mobile
Safari) on earlier versions.
Authentication is performed using `ASWebAuthenticationSession`.

#### Authorization Server Requirements

Expand Down
7 changes: 2 additions & 5 deletions Sources/AppAuth/iOS/OIDExternalUserAgentIOS.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ API_UNAVAILABLE(macCatalyst)

/*! @brief The designated initializer.
@param presentingViewController The view controller from which to present the authentication UI.
@discussion The specific authentication UI used depends on the iOS version and accessibility
options. iOS 12+ uses @c ASWebAuthenticationSession (unless Guided Access is on),
otherwise local browser is used.
@discussion The specific authentication UI used depends on the iOS version and accessibility options. Uses @c ASWebAuthenticationSession. If Guided Access is enabled or the session cannot be started, the method returns NO and the authorization flow fails with an error.
*/
- (nullable instancetype)initWithPresentingViewController:
(UIViewController *)presentingViewController
Expand All @@ -52,8 +50,7 @@ API_UNAVAILABLE(macCatalyst)
@param presentingViewController The view controller from which to present the browser.
@param prefersEphemeralSession Whether the caller prefers to use a private authentication
session. See @c ASWebAuthenticationSession.prefersEphemeralWebBrowserSession for more.
@discussion Authentication is performed with @c ASWebAuthenticationSession (unless Guided Access
is on), setting the ephemerality based on the argument.
@discussion Authentication is performed with @c ASWebAuthenticationSession, setting the ephemerality based on the argument. If Guided Access is enabled or the session cannot be started, the method returns NO and the authorization flow fails with an error.
*/
- (nullable instancetype)initWithPresentingViewController:
(UIViewController *)presentingViewController
Expand Down
9 changes: 3 additions & 6 deletions Sources/AppAuth/iOS/OIDExternalUserAgentIOS.m
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,9 @@ - (BOOL)presentExternalUserAgentRequest:(id<OIDExternalUserAgentRequest>)request
openedUserAgent = [authenticationVC start];
}
}
// If all else failed use the local browser.
if (!openedUserAgent){
[[UIApplication sharedApplication] openURL:requestURL
options:@{}
completionHandler:nil];
openedUserAgent = YES;
if (!openedUserAgent) {
[self cleanUp];
return NO;
}

return openedUserAgent;
Expand Down
Loading