ForgeRock Developer Experience

JavaScript tutorials

To complete these tutorials successfully, you should perform the following prerequisite tasks.

Install Node and NPM

The SDK requires a minimum Node.js version of 18, and is tested on versions 18 and 20. To get a supported version of Node.js, refer to the Node.js download page.

You will also need npm to build the code and run the samples.

Configure your server

Select your server environment below for instructions on creating the necessary configuration to successfully complete these tutorials:

Tutorial steps

There are two tutorials available for JavaScript, depending on your server environment:

ForgeRock logo

Configure a sample JavaScript app to connect to your ForgeRock server.

Then, navigate through a simple authentication journey, and obtain OAuth 2.0 tokens for the user.

Step 1. Download the samples

Download the ForgeRock SDK for JavaScript samples from the Git repository to your local machine.

Step 2. Install the dependencies

Install the required modules to build the ForgeRock SDK for JavaScript samples.

Step 3. Configure the embedded login sample app

Configure a sample app provided in the ForgeRock SDK for JavaScript to connect to your ForgeRock instance.

Step 4. Run the embedded login sample app

Run and test the sample application to ensure it is configured correctly and authenticates users.

PingIdentity logo

Configure a sample JavaScript app to redirect users to PingOne for authentication.

Then, redirect back to your sample client application so that it can get OAuth 2.0 tokens and user info for the user.

Step 1. Download the samples

Download the ForgeRock SDK for JavaScript samples from the Git repository to your local machine.

Step 2. Install the dependencies

Install the required modules to build the ForgeRock SDK for JavaScript samples.

Step 3. Configure the central login sample app

Configure a sample app provided in the ForgeRock SDK for JavaScript to connect to your PingOne instance, by using its .well-known endpoint.

Step 4. Run the central login sample app

Run and test the sample application to ensure it is configured correctly and authenticates users.

Copyright © 2010-2024 ForgeRock, all rights reserved.