PingBrowser
Ping Browser is a library that allows you to instantiate and use an in-app browser for performing OIDC flows.
This library act as a plugin to the ExternalIdp module,
and it provides the necessary configuration to launch the browser to authenticate with the External IDP.
Getting Started
Prerequisites
- iOS 16.0+
- Swift 6.0+
- Xcode 15+
Installation
To integrate the module into your iOS project, add the following dependency to your Package.swift or Podfile file.
Swift Package Manager
dependencies: [
.package(url: "https://github.com/ForgeRock/ping-ios-sdk.git", from: "<version>")
]
Then add the PingBrowser product to your target’s dependencies.
CocoaPods
pod 'PingBrowser', '~> <version>'
Import the Module
import PingBrowser
Usage
The PingBrowser is used internally in the External_idp module. You can use the PingBrowser in standalone mode by calling the following:
await BrowserLauncher.currentBrowser?.launch(url: request.urlRequest.url!, customParams: nil, browserType: .authSession, browserMode: .login, callbackURLScheme: callbackURLScheme)
BrowserLauncher configuration
The BrowserLauncher has the following public methods:
Reset()launch(url: URL, customParams: [String: String]? = nil, browserType: BrowserType = .authSession, browserMode: BrowserMode = .login, callbackURLScheme: String) async throws -> URL
The BrowserLauncher supports the following types of BrowserMode (Not fully implemented yet):
loginlogoutcustom
The BrowserLauncher supports the following types of BrowserType (Not fully implemented yet):
authSession<– DefaultsfViewControllernativeBrowserAppephemeralAuthSession
At the current time only authSession and ephemeralAuthSession are implemented. Both types rely on the ASWebAuthenticationSession in-app browser type.
License
This software may be modified and distributed under the terms of the MIT license. See the LICENSE file for details.
© Copyright 2025-2026 Ping Identity Corporation. All Rights Reserved.
View on GitHub