Ping SDKs

Step 3. Import the widget

To use the Ping (ForgeRock) Login Widget, import the modules you want to use into your app:

// Import the Login Widget
import Widget, { configuration } from '@forgerock/login-widget';

The exact syntax for importing the widget depends on the module system you are using.

The Ping (ForgeRock) Login Widget exports a number of different modules, each providing different functionality.

Ping (ForgeRock) Login Widget modules
Module Description API reference

Widget

Use this main class to instantiate the Ping (ForgeRock) Login Widget, mount it into the DOM, and set up event listeners.

Widget API reference

configuration

Use this module to configure the Ping (ForgeRock) Login Widget. You can configure the settings it needs to contact the authorization server, styles, layout, and override content.

Configuration API reference

journey

Use this module to configure and start an authentication journey.

Journey API reference

component

Use this module to subscribe to events triggered by the Ping (ForgeRock) Login Widget and for controlling the modal form factor.

Component API reference

user

Use this module for managing users in the Ping (ForgeRock) Login Widget, such as obtaining user or token information, and logging users out.

User API reference

Next

Next, you can Step 4. Configure the SDK.