Variable stateConst

state: State = frodo.state

Default state instance

Remarks

Frodo maintains a state for each instance. The state is where Frodo gets configuration information from like host to connecto to, username and password to use, whether to allow insecure connections or not, etc. As the library operates, it updates its state.

The default frodo instance contains an empty state instance by default. In order to use the default frodo instance, you must populate its state with the minimum required information to login to your ForgeRock Identity Platform instance:

// configure the state before invoking any library functions that require credentials
state.setHost('https://instance0/am');
state.setUsername('admin');
state.setPassword('p@ssw0rd!');

// now the library can login
frodo.login.getTokens();

// and perform operations
frodo.authn.journey.exportJourney('Login');