ForgeRock Developer Experience

Incompatible changes

Incompatible changes refer to changes that impact existing functionality and might have an effect on your deployment. Before you upgrade, review these lists and make the appropriate changes to your scripts and plugins.

SDK for iOS 4.0.0

Exception changes
  • The FRAClient.updateAccount() method now throws AccountError.accountLocked when attempting to update a locked account.

  • The HOTPMechanism.generateCode() and TOTPMechanism.generateCode() methods now throw AccountError.accountLocked when attempting to get an OATH token for a locked account.

Method signature changes

The signature of the following methods has changed:

WebAuthnRegistrationCallback
Old
public func register(
  node: Node? = nil,
  onSuccess: @escaping StringCompletionCallback,
  onError: @escaping ErrorCallback
)
New
public func register(
  node: Node? = nil,
  window: UIWindow? = UIApplication.shared.windows.first,
  deviceName: String? = nil,
  usePasskeysIfAvailable: Bool = false,
  onSuccess: @escaping StringCompletionCallback,
  onError: @escaping ErrorCallback
)
WebAuthnAuthenticationCallback
Old
public func authenticate(
  node: Node? = nil,
  onSuccess: @escaping StringCompletionCallback,
  onError: @escaping ErrorCallback
)
New
public func authenticate(
  node: Node? = nil,
  window: UIWindow? = UIApplication.shared.windows.first,
  preferImmediatelyAvailableCredentials: Bool = false,
  usePasskeysIfAvailable: Bool = false,
  onSuccess: @escaping StringCompletionCallback,
  onError: @escaping ErrorCallback
)
FacebookSignInHandler
Old
public static func handle(
  _ application: UIApplication,
  _ url: URL,
  _ options: [UIApplication.OpenURLOptionsKey : Any] = [:]
) -> Bool
New
public static func application(
  _ application: UIApplication,
  didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil
) -> Bool

In 4.0.0 and later, make calls to the method using:

application(_ application:, didFinishLaunchingWithOptions launchOptions: )

Not the previous call:

application(_ app:, open url:, options:)

SDK for Android 4.0.0

Removed support for native single sign-on (SSO)

The Android platform has deprecated sharedUserId that underpins the ForgeRock SDK for Android native SSO implementation.

This native SSO implementation will not be viable after sharedUserId is removed from the Android platform.

Due to this deprecation, SDK for Android 4.0.0 removes support for Android native single sign-on, as well as the following related changes:

  • AuthenticatorService is removed. Remove <service> from your AndroidManifest.xml file.

  • The SDK for Android no longer requires the following permissions:

    • android.permission.AUTHENTICATE_ACCOUNTS

    • android.permission.GET_ACCOUNTS

    • android.permission.MANAGE_ACCOUNTS

    • android.permission.USE_CREDENTIALS

  • The SDK for Android no longer requires the following configuration properties:

    • forgerock

    • forgerock_account_name

    • forgerock_webauthn_account_name

    • forgerock_webauthn_max_credential

    • forgerock_enable_sso

Method signature changes

The signature of the following methods has changed:

WebAuthnRegistrationCallback
Old
public void register(Node node,FRListener<Void> listener)
New
suspend fun register(context: Context, node: Node)
WebAuthAuthenticationCallback
Old
public void authenticate(
  @NonNull Fragment fragment,
  @NonNull Node node,
  @Nullable WebAuthnKeySelector selector,
  FRListener<Void> listener
)
New
suspend fun authenticate(
  context: Context,
  node: Node,
  selector: WebAuthnKeySelector = WebAuthnKeySelector.DEFAULT
)
org.forgerock.android.auth.FRAClient
Old
public boolean updateAccount(@NonNull Account account)
New
public boolean updateAccount(@NonNull Account account)
  throws AccountLockException
org.forgerock.android.auth.HOTPMechanism
Old
public OathTokenCode getOathTokenCode()
  throws OathMechanismException
New
public OathTokenCode getOathTokenCode()
  throws OathMechanismException, AccountLockException
org.forgerock.android.auth.OathMechanism
Old
public abstract OathTokenCode getOathTokenCode()
  throws OathMechanismException
New
public abstract OathTokenCode getOathTokenCode()
  throws OathMechanismException, AccountLockException
org.forgerock.android.auth.TOTPMechanism
Old
public OathTokenCode getOathTokenCode()
  throws OathMechanismException
New
public OathTokenCode getOathTokenCode()
  throws OathMechanismException, AccountLockException

SDK for JavaScript 4.0.0

No longer provides Universal Module Definition (UMD) support

This version of the SDK for JavaScript does not provide a UMD bundle.

If you require UMD support, you can:

  • Use an earlier version of the SDK for JavaScript, such as 3.4.

  • Clone the repository with the latest source code and configure it locally to provide UMD support.

    Support for CommonJS (CJS) and ES Modules (ESM) is not affected and still provided in SDK for JavaScript 4.0.0

Removal of indexedDB token store

The indexedDB option has been removed from the tokenStore configuration property in ForgeRock SDK for JavaScript 4.0. The indexedDB option did not offer sufficient functionality or reliability when the browser is using a private or incognito window.

If you are using the indexedDB option after upgrading to SDK for JavaScript 4.0.0 it is ignored and the SDK defaults to using the localStorage option instead. A warning message is output to the browser console.

This change will not affect the functionality of your app.

For more information on options for the token store, refer to Configure the SDKs.

Updated Policy types

Updated policy types so that a PolicyRequirement array is output from failedPolicies.

Removed duplicate modules

Removed the FRUI and Event modules from the SDK for JavaScript repository.

These modules were incorrectly duplicated from the forgerock-javascript-sdk-ui repository.

Copyright © 2010-2024 ForgeRock, all rights reserved.