### Install JavaScript SDK Dependencies with npm Source: https://docs.pingidentity.com/sdks/latest/oidc/use-cases/custom-login-ui/00-before-you-begin Install all required npm packages and dependencies for the JavaScript SDK sample application. Navigate to the javascript folder within the sdk-sample-apps directory and run npm install to populate the node_modules folder with required packages. ```shell npm install ``` -------------------------------- ### Install iOS Pod Dependencies Source: https://docs.pingidentity.com/sdks/latest/authenticator-module/getting-started/01-setup-your-project Installs all the dependencies defined in the iOS `Podfile` using the `pod install` command. This command should be run after updating the `Podfile` to include new libraries. ```bash pod install ``` -------------------------------- ### Build Ping Login Widget from Source Source: https://docs.pingidentity.com/sdks/latest/login-widget/tutorial/01-install Guides through downloading, customizing, and building the Ping (ForgeRock) Login Widget from its source code repository. This allows for theme customization and other modifications. ```bash git clone https://github.com/ForgeRock/forgerock-web-login-framework.git ``` ```bash cd forgerock-web-login-framework ``` ```bash npm install ``` ```bash npm run build:widget ``` -------------------------------- ### Setup Class Functions for Workflow Management (Kotlin) Source: https://docs.pingidentity.com/sdks/latest/davinci/_attachments/android/api-reference/foundation/orchestrate/com.pingidentity.orchestrate/-setup/index Provides functions to manage and define the workflow of an application module. These functions allow developers to add initialization blocks, define next steps, process nodes, handle responses, sign off, start the workflow, and manage success states. ```kotlin fun init(block: suspend () -> Unit) fun next(block: suspend FlowContext.(ContinueNode, Request) -> Request) fun node(block: suspend FlowContext.(Node) -> Node) fun response(block: suspend FlowContext.(Response) -> Unit) fun signOff(block: suspend (Request) -> Request) fun start(block: suspend FlowContext.(Request) -> Request) fun success(block: suspend FlowContext.(SuccessNode) -> SuccessNode) fun transform(block: suspend FlowContext.(Response) -> Node) ``` -------------------------------- ### Start Specific Journey with Ping Login Widget (JavaScript) Source: https://docs.pingidentity.com/sdks/latest/login-widget/tutorial/06-journey This example shows how to start a specific journey by providing its name to the `start()` method of the `journeyEvents` object. This overrides the default journey configured on the server. The `forgerock` and `resumeUrl` parameters can also be optionally provided. ```javascript // Specify a different journey journeyEvents.start({ journey: 'sdkRegistrationJourney', }); ``` -------------------------------- ### Setup Class Properties (Kotlin) Source: https://docs.pingidentity.com/sdks/latest/davinci/_attachments/android/api-reference/foundation/orchestrate/com.pingidentity.orchestrate/-setup/index Defines the core properties available within the Setup class. These include configuration, HTTP client, logger, shared context, and workflow instances, essential for module setup and operation. ```kotlin class Setup val config: ModuleConfig val httpClient: HttpClient val logger: Logger val sharedContext: SharedContext val workflow: Workflow ``` -------------------------------- ### Run Node.js API Server Source: https://docs.pingidentity.com/sdks/latest/sdks/tutorials/flutter/02_configure-the-projects Starts the Node.js API backend server after dependencies are installed and configuration is complete. The server listens on the configured port. ```shell npm run todo-api ``` -------------------------------- ### Example .env File Content Source: https://docs.pingidentity.com/sdks/latest/sdks/tutorials/javascript/03_configuring-sample-forgerocksdk-js Provides an example of a populated `.env` file with actual values for `SERVER_URL`, `REALM_PATH`, `SCOPE`, `TIMEOUT`, `TREE`, and `WEB_OAUTH_CLIENT`, used for configuring the application's connection to the authentication server. ```properties AM_URL=https://openam-forgerock-sdks.forgeblocks.com/am REALM_PATH=alpha SCOPE=openid profile email address TIMEOUT=5000 TREE=sdkUsernamePasswordJourney ``` -------------------------------- ### Initialize FRAuth SDK Source: https://docs.pingidentity.com/sdks/latest/_attachments/android/api-reference/forgerock-auth/forgerock-auth/org.forgerock.android.auth/-f-r-auth/index Provides methods to start the SDK with or without additional options. The `start` method initializes the authentication process. It optionally accepts `FROptions` for further configuration. ```java open fun start(context: Context) open fun start( context: Context, @Nullable options: FROptions) ``` -------------------------------- ### Start Ping Authenticator Module - iOS Source: https://docs.pingidentity.com/sdks/latest/authenticator-module/getting-started/02-start-the-module Starts the Ping Authenticator module on iOS. This involves importing the FRAuthenticator library and calling the start() method on the FRAClient. Ensure the FRAuthenticator framework is linked to your project. ```swift import FRAuthenticator ``` ```swift FRAClient.start() ``` -------------------------------- ### FRAuth Dynamic Configuration Example with Real Values - Swift Source: https://docs.pingidentity.com/sdks/latest/sdks/tutorials/ios/02_configuring-sample-for-aic-or-pingam Complete example of FRAuth initialization with sample OAuth 2.0 configuration values. Demonstrates proper formatting for URL, realm, client ID, redirect URI, and scopes. Replace these example values with actual credentials from your OAuth 2.0 application configuration. ```Swift let options = FROptions( url: "https://openam-forgerock-sdks.forgeblocks.com/am", cookieName: "ch15fefc5407912", realm: "alpha", oauthClientId: "sdkPublicClient", oauthRedirectUri: "org.forgerock.demo://oauth2redirect", oauthScope: "openid profile email address", authServiceName: "Login", registrationServiceName: "Register") try FRAuth.start(options: options) ``` -------------------------------- ### Import Ping Login Widget Component Source: https://docs.pingidentity.com/sdks/latest/login-widget/tutorial/01-install Demonstrates how to import the built Widget component into your application after building it from source. The exact path and syntax may vary based on your project setup. ```javascript import Widget from '../path/to/package/index.js'; ``` -------------------------------- ### Activity Starting (Kotlin) Source: https://docs.pingidentity.com/sdks/latest/_attachments/android/api-reference/forgerock-auth-ui/forgerock-auth-ui/org.forgerock.android.auth.ui.callback/-callback-fragment/index Functions to start activities, including direct startActivity, startActivityForResult for obtaining a result, and startIntentSenderForResult for launching an IntentSender. ```kotlin startActivity open fun startActivity(p: Intent) startActivityForResult open fun startActivityForResult(p: Intent, p1: Int) startIntentSenderForResult open fun startIntentSenderForResult( p: IntentSender, p1: Int, p2: Intent, p3: Int, p4: Int, p5: Int, p6: Bundle) ``` -------------------------------- ### Swift Setup Struct Definition Source: https://docs.pingidentity.com/sdks/latest/davinci/_attachments/ios/api-reference/Orchestrate/Structs/Setup Defines the generic Setup struct used for configuring application modules. It holds properties for workflow, context, logger, HTTP client, and module-specific configuration. It is designed to be Sendable for concurrent use. ```swift public struct Setup : Sendable where ModuleConfig : Sendable { public let workflow: Workflow public let context: SharedContext public let logger: Logger public let httpClient: HttpClient public let config: ModuleConfig public init(workflow: Workflow, config: ModuleConfig) public func initialize(block: @escaping @Sendable () async throws -> Void) public func start(_ block: @escaping @Sendable (FlowContext, Request) async throws -> Request) public func next(block: @escaping @Sendable (FlowContext, ContinueNode, Request) async throws -> Request) public func response(block: @escaping @Sendable (FlowContext, Response) async throws -> Void) public func node(block: @escaping @Sendable (FlowContext, Node) async throws -> Node) public func success(block: @escaping @Sendable (FlowContext, SuccessNode) async throws -> SuccessNode) public func transform(block: @escaping @Sendable (FlowContext, Response) async throws -> Node) public func signOff(block: @escaping @Sendable (Request) async -> Request) } ``` -------------------------------- ### Install Ping Login Widget using npm Source: https://docs.pingidentity.com/sdks/latest/login-widget/tutorial/01-install Installs the Ping (ForgeRock) Login Widget into your project using Node Package Manager (npm). This is the recommended and simplest method for integration. ```bash npm install @forgerock/login-widget ``` -------------------------------- ### Example .env Configuration for Ping OAuth 2.0 Source: https://docs.pingidentity.com/sdks/latest/oidc/tutorials/javascript/pingam/03_configure_connection_properties Completed example of the `.env` configuration file with sample values for connecting to a PingAM server. Shows proper formatting with OAuth 2.0 scopes, timeout value in milliseconds, client ID, the well-known endpoint URL, and server type specification for PingOne Advanced Identity Cloud compatibility. ```plaintext SCOPE="address email openid phone profile" TIMEOUT=3000 WEB_OAUTH_CLIENT="sdkPublicClient" WELL_KNOWN="https://openam.example.com:8443/openam/oauth2/.well-known/openid-configuration" SERVER_TYPE="AIC" ``` -------------------------------- ### WebAuthn Authentication Setup with FRWebAuthn Source: https://docs.pingidentity.com/sdks/latest/_attachments/android/api-reference/forgerock-auth/forgerock-auth/org.forgerock.android.auth.devicebind/-none/set-key This shows how to initiate a WebAuthn authentication flow using the FRWebAuthn class. It likely involves passing necessary parameters to start the authentication process, potentially interacting with the device's authenticator. Dependencies include the WebAuthn library and Android system services. ```kotlin import org.forgerock.android.auth.webauthn.FRWebAuthn // Example of initiating authentication // FRWebAuthn.authenticate(context, authenticationParameters) ``` -------------------------------- ### Install PingOne Protect and ForgeRock JavaScript SDKs Source: https://docs.pingidentity.com/sdks/latest/_attachments/javascript/ping-protect-api/index This command installs the necessary modules for integrating PingOne Protect with the ForgeRock JavaScript SDK. Ensure you have Node.js and npm or yarn installed. ```bash npm install @forgerock/javascript-sdk @forgerock/ping-protect ``` -------------------------------- ### ModuleRegistry Initializer Source: https://docs.pingidentity.com/sdks/latest/davinci/_attachments/ios/api-reference/Orchestrate/Classes/ModuleRegistry Initializes a new ModuleRegistry instance with the provided setup function, priority, ID, and configuration. The setup function is a Sendable closure. ```Swift public init(setup: @escaping @Sendable (Setup) -> (Void), priority: Int, id: UUID, config: Config) ``` -------------------------------- ### Start Default Journey with Ping Login Widget (JavaScript) Source: https://docs.pingidentity.com/sdks/latest/login-widget/tutorial/06-journey This code snippet demonstrates how to initialize the Ping (ForgeRock) Login Widget and start the default journey. It includes configuring the SDK with server details and mounting the widget. Ensure the widget is instantiated before calling `journeyEvents.start()`. ```javascript // Import the Login Widget import Widget, { configuration, journey } from '@forgerock/login-widget'; // Configure SDK options const myConfig = configuration(); myConfig.set({ forgerock: { serverConfig: { baseUrl: 'https://openam-forgerock-sdks.forgeblocks.com/am', timeout: 3000, }, // Optional but recommended configuration: realmPath: 'alpha', clientId: 'sdkPublicClient', redirectUri: window.location.href, scope: 'openid profile email address' }, }, }); // Get the element in your HTML into which you will mount the widget const widgetRootEl = document.getElementById('widget-root'); // Instantiate Widget with the `new` keyword new Widget({ target: widgetRootEl, }); // Assign the journey function const journeyEvents = journey(); // Ensure you call `.start` *AFTER* instantiating the Widget journeyEvents.start(); ``` -------------------------------- ### Initialization & Lifecycle Source: https://docs.pingidentity.com/sdks/latest/_attachments/android/api-reference/forgerock-auth/forgerock-auth/org.forgerock.android.auth.selfservice/-bound-device/index SDK initialization, content provider setup, and lifecycle management for proper resource handling. ```APIDOC ## Initialization & Lifecycle ### Description SDK initialization and lifecycle management for proper setup and cleanup. ### Initialization - **InitProvider** - Content provider for initialization - **FRAuth** - Main SDK entry point - **FRAuthBuilder** - Builder for FRAuth setup ### Lifecycle Management - **FRLifecycle** - Lifecycle management interface - **FRLifecycleListener** - Listens to lifecycle events ``` -------------------------------- ### Module Setup Function Declaration (Swift) Source: https://docs.pingidentity.com/sdks/latest/davinci/_attachments/ios/api-reference/Orchestrate/Protocols/ModuleRegistryProtocol Declares the `setup` function for the ModuleRegistryProtocol. This function takes a `Setup` object with the module's `Config` type and performs the module's setup process. ```swift var setup: @Sendable (Setup) -> (Void) { get } ``` -------------------------------- ### Example .env file configuration for PingOne SDK Sample App Source: https://docs.pingidentity.com/sdks/latest/davinci/tutorials/javascript/03_configuring-sample-forgerocksdk-js This is an example of a populated `.env` file for a PingOne SDK sample application, demonstrating concrete values for API URL, port, web OAuth client ID, scopes, and the well-known URL. These values are essential for establishing a connection and initiating authentication flows. ```dotenv API_URL=http://localhost:9443 DEBUGGER_OFF=true DEVELOPMENT=$DEVELOPMENT PORT=8443 WEB_OAUTH_CLIENT="6c7eb89a-66e9-ab12-cd34-eeaf795650b2" SCOPE="openid profile email address" WELLKNOWN_URL="https://auth.pingone.ca/3072206d-c6ce-ch15-m0nd-f87e972c7cc3/as/.well-known/openid-configuration" ``` -------------------------------- ### Register and Start iOS Ping SDK with Custom StorageClient Source: https://docs.pingidentity.com/sdks/latest/authenticator-module/getting-started/03-customize-storage-clients Demonstrates how to register a custom StorageClient implementation with the FRAClient and start the Ping SDK. Ensure the custom StorageClient is instantiated and registered before calling FRAClient.start(). Once the SDK is started, the StorageClient cannot be changed. ```swift // Initiate your custom StorageClient let customStorageClient = CustomStorageClient() // Register it with your FRAClient FRAClient.setStorage(storage: customStorageClient) // Initiate the SDK FRAClient.start() ``` -------------------------------- ### Android Fragment Lifecycle: onCreate Method Source: https://docs.pingidentity.com/sdks/latest/_attachments/android/api-reference/forgerock-auth-ui/forgerock-auth-ui/org.forgerock.android.auth.ui.callback/-callback-fragment/on-create The onCreate method is a fundamental lifecycle method for Android Fragments. It's called when the fragment is first created, and it's where you should perform initial setup, such as inflating the layout and initializing views. Any setup that needs to happen once for the fragment should be placed here. ```kotlin open fun onCreate(savedInstanceState: Bundle) ``` -------------------------------- ### Start REST API Development Server Source: https://docs.pingidentity.com/sdks/latest/token-vault/tutorial/advanced-token-security npm command to start the Node.js-based REST API server for the to-do application. Runs without file watchers and requires manual restart if code or environment variables change. Execute in the root directory. ```shell npm run dev:api ``` -------------------------------- ### Basic IdP Handler and Client Setup Source: https://docs.pingidentity.com/sdks/latest/_attachments/android/api-reference/forgerock-auth/forgerock-auth/org.forgerock.android.auth/-o-auth2-client/token-url Demonstrates the fundamental setup for an Identity Provider (IdP) client and handler. This is crucial for initiating and managing authentication flows with external identity providers. ```java import org.forgerock.android.auth.IdPClient; import org.forgerock.android.auth.IdPHandler; // Initialize IdPClient and IdPHandler IdPClient idpClient = new IdPClient(); IdPHandler idpHandler = new IdPHandler(idpClient); ``` -------------------------------- ### Start React Development Server with Vite Source: https://docs.pingidentity.com/sdks/latest/token-vault/tutorial/advanced-token-security npm command to start the React application development server using Vite. Automatically restarts on file changes for dependent files. Run in the root directory of the SDK repository. ```shell npm run dev:react ``` -------------------------------- ### Example Configuration in main.js Source: https://docs.pingidentity.com/sdks/latest/sdks/tutorials/javascript/03_configuring-sample-forgerocksdk-js Illustrates the `main.js` file after replacing placeholders with actual values for connecting to the authentication server, including the well-known endpoint, client ID, tree, scopes, and redirect URI. ```javascript await Config.setAsync({ serverConfig: { wellknown: 'https://openam-forgerock-sdks.forgeblocks.com/am/oauth2/realms/root/realms/alpha/.well-known/openid-configuration' }, clientId: 'sdkPublicClient', tree: 'sdkUsernamePasswordJourney', scope: 'openid profile email address', redirectUri: `${window.location.origin}/callback.html` }); ``` -------------------------------- ### Module Setup Property (Swift) Source: https://docs.pingidentity.com/sdks/latest/davinci/_attachments/ios/api-reference/Orchestrate/Classes/Module Provides a read-only '@Sendable' function to set up the module. This function takes a 'Setup' object for 'ModuleConfig' and returns 'Void'. ```swift public private(set) var setup: @Sendable (Setup) -> (Void) { get } ``` -------------------------------- ### Start Postponed Enter Transition - Kotlin Source: https://docs.pingidentity.com/sdks/latest/_attachments/android/api-reference/forgerock-auth/forgerock-auth/org.forgerock.android.auth.centralize/-app-auth-fragment2/index Explicitly starts the postponed enter transition for a Fragment. This method is typically called after shared element setup is complete, allowing the transition animations to begin. ```kotlin open fun startPostponedEnterTransition() ``` -------------------------------- ### Biometric Authentication Setup in ForgeRock SDK Source: https://docs.pingidentity.com/sdks/latest/_attachments/android/api-reference/forgerock-core/forgerock-core/org.forgerock.android.auth/-network-config/-network-config-builder/pin This example illustrates the setup for biometric authentication using the `BiometricAuth` class from the `org.forgerock.android.auth.biometric` package. It is essential for secure user authentication on Android devices, leveraging built-in biometric capabilities. ```kotlin val biometricAuth = BiometricAuth(context) ``` -------------------------------- ### Initialize Podfile for iOS Integration Source: https://docs.pingidentity.com/sdks/latest/authenticator-module/getting-started/01-setup-your-project Creates a new `Podfile` in an iOS project's root directory using the `pod init` command. This file is used to manage dependencies for iOS projects, including the Ping Authenticator module. ```bash pod init ``` -------------------------------- ### Get Installed Fonts from Device Source: https://docs.pingidentity.com/sdks/latest/_attachments/javascript/api-reference-core/classes/fr-device Retrieves a string representation of installed fonts on the user's device. This method can be used as part of device fingerprinting to create a unique device identifier based on available system fonts. ```javascript const installedFonts = device.getInstalledFonts(); // Returns string ``` -------------------------------- ### Install iOS Device Binding Dependencies with CocoaPods Source: https://docs.pingidentity.com/sdks/latest/sdks/use-cases/how-to-bind-devices Initialize CocoaPods and add FRDeviceBinding pod to Podfile for iOS device binding functionality. Requires Podfile creation and pod installation commands. ```bash pod init ``` ```bash pod install ``` -------------------------------- ### FROptions Configuration Example - Swift iOS Source: https://docs.pingidentity.com/sdks/latest/sdks/sdkconfiguration/configure-sdk-ios Complete example demonstrating how to configure the Ping Identity ForgeRock SDK in Swift for iOS applications with all required FROptions parameters. ```APIDOC ## Swift iOS SDK Configuration Example ### Description This example shows how to initialize the ForgeRock SDK in an iOS application using Swift with FROptions configuration. ### Configuration Code ```swift let options = FROptions( url: "https://tenant.forgeblocks.com/am", realm: "alpha", cookieName: "46b42b4229cd7a3", oauthClientId: "sdkNativeClient", oauthRedirectUri: "org.forgerock.demo://oauth2redirect", oauthScope: "openid profile email address", authServiceName: "Login", registrationServiceName: "Register" ) try FRAuth.start(options: options) ``` ### Configuration Parameters - **url** (String) - Required - Base URL of the ForgeRock authorization server - **realm** (String) - Required - ForgeRock realm name - **cookieName** (String) - Required - Session cookie name - **oauthClientId** (String) - Required - OAuth 2.0 client identifier - **oauthRedirectUri** (String) - Required - OAuth 2.0 redirect URI for your application - **oauthScope** (String) - Required - Space-separated OAuth 2.0 scopes - **authServiceName** (String) - Required - Name of the authentication service - **registrationServiceName** (String) - Required - Name of the registration service ### Initialization Behavior - **First Call**: SDK checks for existing session and access tokens in local storage. If a valid session exists, the user remains logged in. - **Subsequent Calls**: SDK checks if session and token managers are initialized, cleans existing storage, and removes revoked tokens. - **Token Revocation**: Changing any of these properties will revoke and remove persisted tokens: `url`, `realm`, `cookieName`, `oauthClientId`, `oauthRedirectUri`, `oauthScope` ``` -------------------------------- ### Token Vault Proxy package.json Setup Source: https://docs.pingidentity.com/sdks/latest/token-vault/tutorial/advanced-token-security Defines the package.json for the 'token-vault-proxy' workspace. It specifies the package name, version, description, main entry point, scripts for development, building, and serving, along with empty dependencies and devDependencies. ```json { "name": "token-vault-proxy", "private": true, "version": "1.0.0", "description": "The proxy for Token Vault", "main": "index.js", "scripts": { "dev": "vite", "build": "vite build", "serve": "vite preview --port 5175" }, "dependencies": {}, "devDependencies": {}, "license": "MIT" } ``` -------------------------------- ### Android WebAuthn Registration Instance Source: https://docs.pingidentity.com/sdks/latest/_attachments/android/api-reference/forgerock-auth/forgerock-auth/org.forgerock.android.auth/-retrieve-s-s-o-token-interceptor/intercept WebAuthnRegistration class handles the WebAuthn registration flow. This example shows how to get an instance of it. ```kotlin import org.forgerock.android.auth.webauthn.WebAuthnRegistration val registrationHandler = WebAuthnRegistration() // Use registrationHandler to start the registration process ``` -------------------------------- ### Declare Setup Structure in Swift Source: https://docs.pingidentity.com/sdks/latest/davinci/_attachments/ios/api-reference/Orchestrate/Structs Defines the generic `Setup` structure for module configuration. It holds essential components like `workflow`, `context`, `logger`, `httpClient`, and `config`. It is `Sendable` and requires `ModuleConfig` to also be `Sendable`. ```swift public struct Setup : Sendable where ModuleConfig : Sendable ``` -------------------------------- ### Example SDK Output in Logcat Source: https://docs.pingidentity.com/sdks/latest/sdks/tutorials/android/03_initialize-sdk This is an example of the expected output in Android's Logcat pane after successfully initializing the Ping Identity SDK and running the application. It indicates that the SDK is using SharedPreference for storage and shows the version number. This output helps confirm that the SDK setup is correct. ```text -- PROCESS STARTED (14305) for package com.example [4.8.3] [DefaultTokenManager]: Using SharedPreference: StorageDelegate ``` -------------------------------- ### Get Calling Activity in Kotlin Source: https://docs.pingidentity.com/sdks/latest/davinci/_attachments/android/api-reference/external-idp/com.pingidentity.idp.facebook/-facebook-activity/index Returns the ComponentName of the activity that started this one. This is useful for understanding the navigation flow and for security purposes. Returns a ComponentName or null. ```kotlin open fun getCallingActivity(): ComponentName? ``` -------------------------------- ### Initial .env File Structure Source: https://docs.pingidentity.com/sdks/latest/sdks/tutorials/javascript/03_configuring-sample-forgerocksdk-js Shows the initial content of the `.env` file, which is a copy of `.env.example`. This file is used to store environment-specific configuration variables for connecting to the authentication server. ```properties SERVER_URL=_$SERVER_URL_ REALM_PATH=$REALM_PATH SCOPE=$SCOPE TIMEOUT=$TIMEOUT TREE=$TREE WEB_OAUTH_CLIENT=$WEB_OAUTH_CLIENT ``` -------------------------------- ### Get Packages - Kotlin Source: https://docs.pingidentity.com/sdks/latest/_attachments/android/api-reference/forgerock-core/forgerock-core/org.forgerock.android.auth.detector/-root-app-detector/get-packages Retrieves an array of strings representing installed packages on the device. This function is part of the device detection capabilities within the SDK. ```kotlin protected open fun getPackages(): Array ``` -------------------------------- ### Android WebAuthn Repository Instance Source: https://docs.pingidentity.com/sdks/latest/_attachments/android/api-reference/forgerock-auth/forgerock-auth/org.forgerock.android.auth/-retrieve-s-s-o-token-interceptor/intercept WebAuthnRepository provides the interface for interacting with WebAuthn functionalities. This example shows how to get an instance of the repository. ```kotlin import org.forgerock.android.auth.webauthn.WebAuthnRepository val repository = WebAuthnRepository() // Use the repository for WebAuthn operations ``` -------------------------------- ### General Configuration Source: https://docs.pingidentity.com/sdks/latest/login-widget/tutorial/04-configure-sdk Configure general SDK behavior, such as the inclusion of platform-specific headers. ```APIDOC ## General Configuration ### Description Configure general SDK behavior, such as the inclusion of platform-specific headers. ### Parameters #### Request Body - **platformHeader** (boolean) - Optional - Specify whether to include an `X-Requested-Platform` header in outgoing requests. Defaults to `false`. ``` -------------------------------- ### Fragment Lifecycle - onGetLayoutInflater() in Kotlin Source: https://docs.pingidentity.com/sdks/latest/_attachments/android/api-reference/forgerock-auth-ui/forgerock-auth-ui/org.forgerock.android.auth.ui.callback/-app-integrity-callback-fragment/index Called to get the LayoutInflater for the fragment. Allows providing a custom inflater if needed, for example, to theme the inflated views. ```kotlin open fun onGetLayoutInflater(p: Bundle): LayoutInflater ``` -------------------------------- ### Start Activity - Kotlin Source: https://docs.pingidentity.com/sdks/latest/_attachments/android/api-reference/forgerock-auth/forgerock-auth/org.forgerock.android.auth.centralize/-app-auth-fragment2/index Initiates a new activity from the current Fragment. Overloaded versions allow starting an activity with or without an optional Bundle for passing extras. ```kotlin open fun startActivity(p0: Intent) open fun startActivity(p0: Intent, @Nullable p1: Bundle?) ``` -------------------------------- ### Getting Response Body Example (Kotlin) Source: https://docs.pingidentity.com/sdks/latest/_attachments/android/api-reference/forgerock-auth/forgerock-auth/org.forgerock.android.auth/-response-handler/index Illustrates retrieving the response body as a String using the getBody method of the ResponseHandler. This is often used for parsing JSON or other textual data from the response. ```kotlin fun getResponseBody(handler: ResponseHandler, response: Response): String { return handler.getBody(response) } ``` -------------------------------- ### HTML Structure for Token Vault Integration Source: https://docs.pingidentity.com/sdks/latest/token-vault/getting-started/02-prepare-for-token-vault This HTML file sets up the root elements for mounting the main application and the Token Vault Proxy (iframe). It imports the main application script. ```html
``` -------------------------------- ### Configuration and Options Source: https://docs.pingidentity.com/sdks/latest/_attachments/android/api-reference/forgerock-auth/forgerock-auth/org.forgerock.android.auth.webauthn/-web-authn/-companion/-p-u-b_-k-e-y_-c-r-e-d_-p-a-r-a-m-s Configuration classes for FRAuth setup, server configuration, SSL pinning, and authentication options with builder pattern support. ```APIDOC ## Configuration and Options **Namespace:** org.forgerock.android.auth ### Main Configuration Classes - `FROptions` - Authentication options configuration - `FROptionsBuilder` - Build FROptions - `Config` - Configuration container - `ConfigHelper` - Configuration utilities - `Options` - Base options interface ### Server Configuration - `Server` - Server connection details - `ServerBuilder` - Build server configuration - `ServerConfig` - Server-specific configuration ### Service Configuration - `Service` - Service definition - `ServiceBuilder` - Build service configuration - `AuthService` - Authentication service - `AuthServiceBuilder` - Build auth service - `AuthServiceClient` - Auth service client - `AuthServiceResponseHandler` - Handle service responses ### Security Configuration - `SSLPinning` - SSL certificate pinning - `SSLPinningBuilder` - Configure SSL pinning - `SecureCookieJar` - Secure cookie storage - `SecureCookieJarBuilder` - Build secure cookie jar ### Cookie Management - `CookieMarshaller` - Serialize/deserialize cookies - `SerializableCookie` - Serializable cookie object ### OAuth2 Configuration - `OAuth` - OAuth configuration - `OAuth2` - OAuth2 protocol support - `PKCE` - Proof Key for Code Exchange ### Configuration Pattern ``` FROptions options = new FROptionsBuilder() .withServer( new ServerBuilder() .withUrl("https://auth.example.com") .build() ) .withAuthService("Authentication") .withSslPinning( new SSLPinningBuilder() .addPin("cert_pin") .build() ) .build() FRAuth.Builder() .withOptions(options) .build() ``` ``` -------------------------------- ### Create Custom Memory Storage in Swift Source: https://docs.pingidentity.com/sdks/latest/davinci/_attachments/ios/api-reference/Storage/index Demonstrates how to create a custom storage solution by implementing the `Storage` interface. This example provides a simple in-memory storage implementation with save, get, and delete methods. ```swift public class CustomStorage: Storage { private var data: T? public func save(item: T) async throws { data = item } public func get() async throws -> T? { return data } public func delete() async throws { data = nil } } public class CustomStorageDelegate: StorageDelegate { public init(cacheable: Bool = false) { super.init(delegate: CustomStorage(), cacheable: cacheable) } } ``` -------------------------------- ### Interceptors - Access Token Interceptor Source: https://docs.pingidentity.com/sdks/latest/_attachments/android/api-reference/forgerock-auth/forgerock-auth/org.forgerock.android.auth.devicebind/-device-authenticator/-companion/registered-keys This example shows the basic setup for an AccessTokenInterceptor, which is likely used to add or modify access tokens in outgoing requests. It highlights the import path. ```kotlin import org.forgerock.android.auth.interceptor.AccessTokenInterceptor // Usage would typically involve adding this interceptor to an HTTP client. ``` -------------------------------- ### Clone SDK Sample Apps Repository using Git Source: https://docs.pingidentity.com/sdks/latest/oidc/tutorials/android/pingam/01_downloading-samples-repo This command clones the ForgeRock SDK Sample Apps repository locally using Git. It requires a Git-compatible tool and a network connection to GitHub. The output is a local directory named 'sdk-sample-apps'. ```shell git clone https://github.com/ForgeRock/sdk-sample-apps.git ``` -------------------------------- ### Run Proxy Development Server (npm) Source: https://docs.pingidentity.com/sdks/latest/token-vault/tutorial/advanced-token-security This command builds and runs the proxy application in development mode. It's used to verify the proxy setup and ensure it's serving correctly. After execution, access `http://localhost:5175` in a browser to confirm the 'Proxy is OK' message. ```bash npm run dev:proxy ``` -------------------------------- ### Install Ping SDK for iOS using Swift Package Manager Source: https://docs.pingidentity.com/sdks/latest/sdks/tutorials/flutter/02_configure-the-projects This guide details how to add the FRCore and FRAuth libraries from the ForgeRock iOS SDK repository to your Xcode project using Swift Package Manager. ```swift https://github.com/ForgeRock/forgerock-ios-sdk.git ``` -------------------------------- ### Initialize FRAuth with Dynamic Configuration Options - Swift Source: https://docs.pingidentity.com/sdks/latest/sdks/tutorials/ios/02_configuring-sample-for-aic-or-pingam Creates an FROptions object with OAuth 2.0 connection parameters and initializes FRAuth for the iOS quickstart sample app. Requires replacement of placeholder values with actual OAuth 2.0 application credentials from PingOne Advanced Identity Cloud or PingAM. This method provides runtime configuration without modifying configuration files. ```Swift let options = FROptions( url: "_{as_url}_", cookieName: "_{cookie_name}_", realm: "_{realm_path}_", oauthClientId: "_{oauth2_client_id}_", oauthRedirectUri: "_{oauth2_redirect}_", oauthScope: "_{oauth2_scopes}_", authServiceName: "Login", registrationServiceName: "Register") try FRAuth.start(options: options) ``` -------------------------------- ### Implement Android OpenID Connect Token Storage Source: https://docs.pingidentity.com/sdks/latest/sdks/customize/how-to-customize-storage Example of a custom storage class for OpenID Connect `AccessToken` on Android. It requires implementing `save`, `get`, and `delete` methods. This is useful for scenarios needing specialized storage or older hardware. ```kotlin class _MyCustomTokenStorage_(context: Context) : Storage { override fun save(item: AccessToken) { TODO("Implement save to storage functionality") } override fun get(): AccessToken? { TODO("Implement retrieve to storage functionality") } override fun delete() { TODO("Implement remove from storage functionality") } } ``` -------------------------------- ### Get Fragment Lifecycle Information in PingIdentity SDKs Source: https://docs.pingidentity.com/sdks/latest/_attachments/android/api-reference/forgerock-auth-ui/forgerock-auth-ui/org.forgerock.android.auth.ui.callback/-callback-fragment/index The 'getLifecycle' function returns the Lifecycle object associated with the fragment. This is crucial for observing lifecycle events and performing actions at specific stages of the fragment's life, such as when it's created, started, resumed, or destroyed. ```kotlin open fun getLifecycle(): Lifecycle ``` -------------------------------- ### Implement Android SSO Token Storage Source: https://docs.pingidentity.com/sdks/latest/sdks/customize/how-to-customize-storage Provides an example of a custom storage implementation for SSO tokens (`SSOToken`) on Android. Developers need to implement the `save`, `get`, and `delete` functions within this class. Data migration from previous storage methods should be considered. ```kotlin class _MyCustomSSOTokenStorage_(context: Context) : Storage { override fun save(item: SSOToken) { TODO("Implement save to storage functionality") } override fun get(): SSOToken? { TODO("Implement retrieve to storage functionality") } override fun delete() { TODO("Implement remove from storage functionality") } } ``` -------------------------------- ### Clone SDK Sample Apps Repository using Git Source: https://docs.pingidentity.com/sdks/latest/davinci/tutorials/android/01_downloading-forgerocksdk This snippet demonstrates how to clone the 'sdk-sample-apps' repository locally using the Git command-line tool. It requires a Git-compatible tool and the HTTPS URL of the repository. The output is a local folder named 'sdk-sample-apps'. ```shell git clone https://github.com/ForgeRock/sdk-sample-apps.git.git ``` -------------------------------- ### Basic Ping SDK Initialization (JavaScript) Source: https://docs.pingidentity.com/sdks/latest/sdks/tutorials/reactjs/04_implement_the_sdk This snippet illustrates the initial step of importing the `Config` module from the Ping SDK for JavaScript and calling its `setAsync()` method. This method should be the first SDK method invoked, typically at the application's entry point, to prepare the SDK for subsequent operations. ```javascript + import { Config } from '@forgerock/javascript-sdk'; import React from 'react'; import { createRoot } from 'react-dom/client'; import Router from './router'; import { WELLKNOWN_URL, APP_URL, JOURNEY_LOGIN, WEB_OAUTH_CLIENT } from './constants'; import { AppContext, useGlobalStateMgmt } from './global-state'; import './styles/index.scss'; + const urlParams = new URLSearchParams(window.location.search); + const journeyParam = urlParams.get('journey'); + + await Config.setAsync(); /** * Initialize the React application * This is an IIFE (Immediately Invoked Function Expression), * so it calls itself. */ (async function initAndHydrate() { @@ collapsed @@ ``` -------------------------------- ### Enable Cleartext Traffic in Android Manifest Source: https://docs.pingidentity.com/sdks/latest/sdks/tutorials/android/01_configure-the-dev-environment This XML snippet demonstrates how to enable cleartext network traffic in your Android application's manifest file. This is typically used during development against a local PingAM server that does not use HTTPS. It should not be used in production applications. ```xml ... ``` -------------------------------- ### Request Fine Location Permission in Android Manifest Source: https://docs.pingidentity.com/sdks/latest/sdks/tutorials/android/01_configure-the-dev-environment This XML snippet shows how to declare the necessary permissions for fine location access in your Android application's manifest file. This requires both coarse and fine location permissions and is used for more precise location-based services. ```xml ``` -------------------------------- ### Initialize Ping Protect SDK with Parameters Source: https://docs.pingidentity.com/sdks/latest/_attachments/android/api-reference/ping-protect/ping-protect/org.forgerock.android.auth/-ping-one-provider/index This section details the PIInitParams class used to configure the Ping Protect SDK during initialization. It typically involves setting up necessary parameters for the SDK to function correctly. No specific dependencies are mentioned, and the output is the configured SDK instance. ```kotlin internal class PingOneProvider : ContentProvider { // ... other methods } ``` -------------------------------- ### Launch Browser with URL and Scheme (Swift) Source: https://docs.pingidentity.com/sdks/latest/davinci/_attachments/ios/api-reference/Browser/Protocols/BrowserLauncherProtocol Implements the asynchronous `launch` function in the BrowserLauncherProtocol. This function takes a URL, a BrowserType, and a callback URL scheme, and attempts to launch the browser, returning the resulting URL. It can throw errors and is defined with @MainActor. ```swift @MainActor func launch(url: URL, browserType: BrowserType, callbackURLScheme: String) async throws -> URL ``` -------------------------------- ### Start Service in Kotlin Source: https://docs.pingidentity.com/sdks/latest/davinci/_attachments/android/api-reference/external-idp/com.pingidentity.idp.facebook/-facebook-activity/index Initiates a service with the provided Intent. Returns a ComponentName identifying the started service, or null if the service could not be started. This is the standard method for starting background services. ```kotlin open override fun startService(p0: Intent): ComponentName? ``` -------------------------------- ### Core SDK - Action Method Source: https://docs.pingidentity.com/sdks/latest/_attachments/android/api-reference/forgerock-core/forgerock-core/org.forgerock.android.auth/-request/method Details the `method()` function, likely a placeholder or example method. ```APIDOC ## Core SDK - Action Method ### Description This section describes the `method()` function, which appears to be a sample or placeholder method within the core SDK. ### Method Signature `open fun method(): String` ### Returns A `String` value. ### Package `org.forgerock.android.auth` ``` -------------------------------- ### BrowserLauncherProtocol Definition Source: https://docs.pingidentity.com/sdks/latest/davinci/_attachments/ios/api-reference/Browser/Protocols/BrowserLauncherProtocol Defines the BrowserLauncherProtocol for abstracting browser launching. It requires conformance to Sendable and is marked with @MainActor for main thread operations. ```swift @MainActor public protocol BrowserLauncherProtocol : Sendable { } ``` -------------------------------- ### Request Coarse Location Permission in Android Manifest Source: https://docs.pingidentity.com/sdks/latest/sdks/tutorials/android/01_configure-the-dev-environment This XML snippet shows how to declare the necessary permission for coarse location access in your Android application's manifest file. This is required if your application intends to use Android location services, such as the SDK's location matching or geofencing features. ```xml ``` -------------------------------- ### JavaScript Initialization for Token Vault Client Source: https://docs.pingidentity.com/sdks/latest/token-vault/getting-started/02-prepare-for-token-vault This JavaScript snippet initializes the Token Vault client, registers the interceptor, and sets up the proxy. It also configures the Ping SDK settings. Dependencies include '@forgerock/javascript-sdk' and '@forgerock/token-vault'. ```javascript import { Config, TokenManager } from '@forgerock/javascript-sdk'; import { client } from '@forgerock/token-vault'; const register = client({ /* global config */ }); register.interceptor(); register.proxy(document.getElementById('token-vault')); const tokenVaultStore = register.store(); Config.setAsync({ /* Ping SDK config */}); ``` -------------------------------- ### Android Manifest with Cleartext Traffic and Location Permissions Source: https://docs.pingidentity.com/sdks/latest/sdks/tutorials/android/01_configure-the-dev-environment This XML snippet represents an AndroidManifest.xml file. It configures the application to allow cleartext network traffic and requests permissions for both coarse and fine location access. This is often required for applications that need to interact with network services or obtain precise user location. ```xml ``` -------------------------------- ### Start Foreground Service in Kotlin Source: https://docs.pingidentity.com/sdks/latest/davinci/_attachments/android/api-reference/external-idp/com.pingidentity.idp.facebook/-facebook-activity/index Launches a foreground service with the specified intent. Returns a ComponentName object representing the started service, or null if the service cannot be started. Used to start services that require user notification via a notification channel. ```kotlin open override fun startForegroundService(p0: Intent): ComponentName? ``` -------------------------------- ### org.forgerock.android.auth Package Overview Source: https://docs.pingidentity.com/sdks/latest/_attachments/android/api-reference/forgerock-auth/forgerock-auth/org.forgerock.android.auth/-o-auth2-client/ok-http-client This section provides a high-level overview of the core components within the `org.forgerock.android.auth` package, including authentication services, token management, and configuration. ```APIDOC ## Package: org.forgerock.android.auth ### Description This package contains the primary classes for handling authentication flows, managing access tokens, and configuring the SDK. ### Key Components - **AuthService**: The main entry point for authentication operations. - **AccessToken**: Represents an access token obtained after successful authentication. - **Config**: Used for configuring the SDK's behavior. - **Interceptor**: Allows for customization of the authentication request/response pipeline. ### Example Usage (Conceptual) ``` // Initialize the authentication service val authService = AuthServiceBuilder() .setServerConfig(...) // Configure server details .build() // Authenticate a user authService.authenticate(...) .thenAccept { accessToken -> // Use the access token }) .exceptionally { error -> // Handle authentication errors } ``` ``` -------------------------------- ### Implement DestroyableCallbackRenderer Methods - TypeScript Source: https://docs.pingidentity.com/sdks/latest/_attachments/javascript/api-reference-ui/interfaces/destroyablecallbackrenderer Example implementation pattern showing how to implement the DestroyableCallbackRenderer interface methods. Each method handles specific lifecycle stages: render creates the DOM element, focus prepares for interaction, isValid checks submission validity, onInjected handles post-injection setup, and destroy cleans up resources. ```typescript class MyCallbackRenderer implements DestroyableCallbackRenderer { private element: HTMLElement | null = null; render(): HTMLElement { this.element = document.createElement('div'); this.element.innerHTML = ''; return this.element; } focus?(): void { if (this.element?.querySelector('input')) { (this.element.querySelector('input') as HTMLInputElement).focus(); } } isValid?(): boolean { const input = this.element?.querySelector('input') as HTMLInputElement; return input && input.value.length > 0; } onInjected?(): void { console.log('Callback UI has been added to the DOM'); } destroy(): void { if (this.element) { this.element.remove(); this.element = null; } } } ``` -------------------------------- ### Start Authentication Tree with FRAuth.start Source: https://docs.pingidentity.com/sdks/latest/_attachments/javascript/api-reference-core/classes/fr-auth The FRAuth.start method initiates the authentication tree process by requesting the very first step. It serves as a convenient alias for calling FRAuth.next without providing a previous step, simplifying the initiation of authentication flows. ```javascript forgerock.FRAuth.start() ``` -------------------------------- ### Add Ping SDK for Android Build Dependency Source: https://docs.pingidentity.com/sdks/latest/sdks/tutorials/android/01_configure-the-dev-environment This snippet shows how to add the Ping SDK for Android as a build dependency in your Android project's Gradle file. Ensure you are editing the module-level 'build.gradle' file. The version '4.8.3' is specified, and other common dependencies like appcompat and material design are also shown. ```gradle implementation 'org.forgerock:forgerock-auth:4.8.3' ``` ```gradle dependencies { implementation 'org.forgerock:forgerock-auth:4.8.3' ... implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'com.google.android.material:material:1.8.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' } ``` -------------------------------- ### Subscribe to Journey Completion Events in JavaScript Source: https://docs.pingidentity.com/sdks/latest/login-widget/tutorial/06-journey This snippet demonstrates how to subscribe to journey events using the `journeyEvents.subscribe` method. It includes a callback function that is executed for various journey-related events. The example shows how to conditionally filter these events, specifically logging only successful journey completions to the console. This approach is useful for tracking user progression through a journey. ```javascript journeyEvents.subscribe((event) => { // Called multiple times, filtering by event data is recommended if (event.journey.successful) { // Only output successfull journey log entries console.log(event); } }); ``` -------------------------------- ### Start New Activities Source: https://docs.pingidentity.com/sdks/latest/davinci/_attachments/android/api-reference/external-idp/com.pingidentity.idp.facebook/-facebook-activity/index Methods for launching new activities. This includes starting a single activity, multiple activities in a sequence, and starting activities with additional options. ```kotlin open override fun startActivities(p0: Array) open override fun startActivities(p0: Array, p1: Bundle?) open override fun startActivity(p0: Intent) open override fun startActivity(p0: Intent, p1: Bundle?) ``` -------------------------------- ### Initialize Device Client and Retrieve Devices (iOS) Source: https://docs.pingidentity.com/sdks/latest/sdks/use-cases/how-to-manage-registered-devices Shows how to import FRAuth and initialize the DeviceClient in iOS (Swift), followed by calling the get() method to fetch lists of Oath, Push, WebAuthn, Binding, and Profile devices asynchronously. ```swift import FRAuth let deviceClient = DeviceClient() ``` ```swift let oathDevices = try await deviceClient.oath.get() let pushDevices = try await deviceClient.push.get() let webAuthnDevices = try await deviceClient.webAuthn.get() let bindingDevices = try await deviceClient.bound.get() let profileDevices = try await deviceClient.profile.get() ``` -------------------------------- ### GET Request Method Source: https://docs.pingidentity.com/sdks/latest/_attachments/android/api-reference/forgerock-core/forgerock-core/org.forgerock.android.auth/-request/-builder/index Constructs an HTTP GET request with no request body. Configures the builder to send a GET request to the specified URL. ```APIDOC ## GET Request ### Description Sets the HTTP method to GET for the current request. ### Method GET ### Signature ```kotlin open fun get(): Request.Builder ``` ### Returns - **Request.Builder** - The builder instance for method chaining ### Usage Example ```kotlin val request = requestBuilder .url("https://api.example.com/users") .get() .build() ``` ``` -------------------------------- ### Initialize and Configure FRAuthenticator SDK Source: https://docs.pingidentity.com/sdks/latest/_attachments/ios/api-reference/FRAuthenticator/Classes/FRAClient This snippet demonstrates how to start the FRAuthenticator SDK's lifecycle and set its default storage client and policy evaluator. Ensure the storage client and policy evaluator are properly initialized before use. ```Swift public class FRAClient : NSObject public static var shared: FRAClient? public static func start() public static func setStorage(storage: StorageClient) throws public static func setPolicyEvaluator(policyEvaluator: FRAPolicyEvaluator) throws ``` -------------------------------- ### Get Individual Device Metadata - Browser and Hardware Source: https://docs.pingidentity.com/sdks/latest/_attachments/javascript/api-reference-core/classes/fr-device Retrieves specific device metadata properties including browser information, installed plugins, device name, display settings, and hardware details. These methods return string or object representations of device properties. Useful for selective device identification without collecting full profile data. ```javascript const browserMeta = device.getBrowserMeta(); // Returns { [key: string]: string } const pluginNames = device.getBrowserPluginsNames(); // Returns string const deviceName = device.getDeviceName(); // Returns string const displayMeta = device.getDisplayMeta(); // Returns { [key: string]: null | string | number } const hardwareMeta = device.getHardwareMeta(); // Returns { [key: string]: string } ``` -------------------------------- ### Implement Custom Token Storage Functions - JavaScript Source: https://docs.pingidentity.com/sdks/latest/sdks/customize/how-to-customize-storage Creates a custom token store object implementing set, get, and remove methods for managing OAuth tokens. Each method returns a Promise and handles storage operations for a specific clientId. This example demonstrates in-memory token storage but can be adapted to use databases, local storage, or other persistence mechanisms. ```javascript let inMemoryTokens; myTokenStore = { get(clientId) { console.log('Custom token getter used.'); // Return a promise that resolves to any tokens stored in memory return Promise.resolve(inMemoryTokens); }, set(clientId, tokens) { console.log('Custom token setter used.'); // Example of storing tokens in memory inMemoryTokens = tokens; return Promise.resolve(undefined); }, remove(clientId) { console.log('Custom token remover used.'); // Reset the in-memory store inMemoryTokens = undefined; return Promise.resolve(undefined); }, }; ``` -------------------------------- ### Install DaVinci Client npm JavaScript Source: https://docs.pingidentity.com/sdks/latest/davinci/sdkconfiguration/install Install the DaVinci client module for JavaScript projects from npm registry. This adds the @forgerock/davinci-client package at version 1.2.0 to the project dependencies. ```shell npm install @forgerock/davinci-client@1.2.0 ``` -------------------------------- ### Configure Ping SDK with FROptions in Swift Source: https://docs.pingidentity.com/sdks/latest/sdks/sdkconfiguration/configure-sdk-ios Example demonstrating how to initialize the Ping SDK in iOS applications using the FROptions object. This includes setting various configuration parameters like URL, realm, and OAuth details. The FRAuth.start() method is used for initialization. ```swift let options = FROptions( url: "https://tenant.forgeblocks.com/am", realm: "alpha", cookieName: "46b42b4229cd7a3", oauthClientId: "sdkNativeClient", oauthRedirectUri: "org.forgerock.demo://oauth2redirect", oauthScope: "openid profile email address", authServiceName: "Login", registrationServiceName: "Register") try FRAuth.start(options: options) ``` -------------------------------- ### Start Activity If Needed in Kotlin Source: https://docs.pingidentity.com/sdks/latest/davinci/_attachments/android/api-reference/external-idp/com.pingidentity.idp.facebook/-facebook-activity/index Starts an activity only if it is not already running. Accepts an Intent and request code, with optional Bundle for additional options. Returns true if the activity was started, false if already running. ```kotlin open fun startActivityIfNeeded(p0: Intent, p1: Int): Boolean open fun startActivityIfNeeded(p0: Intent, p1: Int, p2: Bundle?): Boolean ``` -------------------------------- ### Install Token Vault npm Module Source: https://docs.pingidentity.com/sdks/latest/token-vault/tutorial/advanced-token-security Installs the ForgeRock Token Vault npm module at the root level of the application. This module is used across multiple applications in the project, making root-level installation beneficial for code reuse. ```shell npm install @forgerock/token-vault ```