ForgeRock SDKs

Configure your JavaScript app

This section covers how to configure the settings the ForgeRock JavaScript SDK uses within your application.

Configuration strings

You provide the configuration strings by editing the serverConfig object, a parameter of the forgerock.Config.set() function.

Property Description


An interface for configuring how the SDK contacts the AM instance. Contains baseUrl and timeout.

serverConfig {baseUrl}

The base URL of the AM instance to connect to, including port and deployment path. For example,

serverConfig {timeout}

An optional timeout, in milliseconds, for each request that communicates with AM. For example, for 30 seconds specify 30000. Defaults to 5000 (5 seconds).


The realm or realm path in which the tree is configured. The default is the top-level realm root.


The name of the tree to use.


The client_id of the OAuth 2.0 client profile to use.


The redirect_uri as set in the OAuth 2.0 client profile.


A space-separated list of scopes to request when performing an OAuth 2.0 authorization flow.


A threshold, in seconds, to refresh an OAuth 2.0 token before the access_token expires (defaults to 30 seconds).

Copyright © 2010-2022 ForgeRock, all rights reserved.