---
title: Configuring the Journey module in JavaScript
description: PingOne Advanced Identity Cloud PingAM JavaScript
component: orchsdks
page_id: orchsdks:journey:usage/javascript/03-configuring-the-journey-module
canonical_url: https://developer.pingidentity.com/orchsdks/journey/usage/javascript/03-configuring-the-journey-module.html
revdate: Wed, 4 Mar 2026 13:32:08 +0000
keywords: ["OAuth 2.0", "OpenID Connect", "Setup &amp; Configuration", "Source Code", "Integration", "SDK", "Android"]
---

# Configuring the Journey module in JavaScript

[icon: circle-check, set=far]PingOne Advanced Identity Cloud [icon: circle-check, set=far]PingAM [icon: js, set=fab]JavaScript

* [Prepare](01-configuring-the-server.html)

* [Install](02-installing-the-journey-module.html)

* **Configure**

* [Start](04-starting-an-authentication-journey.html)

* [Navigate](05-navigating-an-authentication-journey.html)

* [Manage](06-handling-sessions.html)

You must configure the **Journey** client to connect to your Advanced Identity Cloud or PingAM server.

To configure the module, call the `journey()` factory function and provide the configuration options as follows:

Configuring the `journey` client

```javascript
const journeyClient = await journey({
  logger: {
    level: 'warn', // Specify which messages the module should output
    custom: customLogger, // Specify a custom logger object for the module
  },
  config: {
    serverConfig: {
      wellknown: 'https://openam-forgerock-sdks.forgeblocks.com/am/oauth2/realms/alpha/.well-known/openid-configuration',
    },
  },
  requestMiddleware: [
    customHeaderMiddleware,
    customParamMiddleware
  ]
});
```

Update the following properties with values that match your environment:

* *wellknown*

  The OpenID Connect well-known endpoint for your server.

  The **Journey** module derives the various endpoints and data it requires from the well-known endpoint, such as the server's base URL, the realm being used, and the authenticate and session endpoints.

  * *Advanced Identity Cloud example:*

    `https://openam-forgerock-sdks.forgeblocks.com/am/oauth2/realms/alpha/.well-known/openid-configuration`

    > **Collapse: How do I find my PingOne Advanced Identity Cloud  URL?**
    >
    > You can view the `.well-known` endpoint for an OAuth 2.0 client in the PingOne Advanced Identity Cloud admin console:
    >
    > 1. Log in to your PingOne Advanced Identity Cloud administration console.
    >
    > 2. Click Applications, and then select the OAuth 2.0 client you created earlier. For example, sdkPublicClient.
    >
    > 3. On the Sign On tab, in the Client Credentials section, copy the Discovery URI value.
    >
    >    For example, `https://openam-forgerock-sdks.forgeblocks.com/am/oauth2/alpha/.well-known/openid-configuration`
    >
    > |   |                                                                                                                                                                                                                                                                                                                                 |
    > | - | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    > |   | If you are using a custom domain, your `.well-known` is formed as follows:`https://<custom-domain-fqdn>/.well-known/openid-configuration`Learn more in [Access OIDC configuration discovery endpoint](https://docs.pingidentity.com/pingoneaic/latest/realms/custom-domains.html#access-oidc-configuration-discovery-endpoint). |

  * *PingAM example:*

    `https://openam.example.com:8443/openam/oauth2/realms/root/.well-known/openid-configuration`

    > **Collapse: How do I find my PingAM  URL?**
    >
    > To form the `.well-known` URL for an PingAM server, concatenate the following information into a single URL:
    >
    > 1. The base URL of the PingAM component of your deployment, including the port number and deployment path.
    >
    >    For example, `https://openam.example.com:8443/openam`
    >
    > 2. The string `/oauth2`
    >
    > 3. The hierarchy of the realm that contains the OAuth 2.0 client.
    >
    >    You must specify the entire hierarchy of the realm, starting at the Top Level Realm. Prefix each realm in the hierarchy with the `realms/` keyword.
    >
    >    For example, `/realms/root/realms/customers`
    >
    >    |   |                                                                                 |
    >    | - | ------------------------------------------------------------------------------- |
    >    |   | If you omit the realm hierarchy, the top level `ROOT` realm is used by default. |
    >
    > 4. The string `/.well-known/openid-configuration`
    >
    > For example, `https://openam.example.com:8443/openam/oauth2/realms/root/.well-known/openid-configuration`

- *level*

  Specify what level of logging the Orchestration SDK should output.

  Select one of the following:

  * `none`

  * `error`

  * `warn`

  * `info` (the default)

  * `debug`

    Learn more in [Configuring JavaScript logging](../../customization/logging/javascript-custom-logging.html#configuring-logging-on-javascript).

- *custom*

  A custom logger object that the module will use to output messages.

  Learn more in [Customizing JavaScript logging](../../customization/logging/javascript-custom-logging.html#customize-logger-javascript).

- *requestMiddleware*

  The middleware to use to customize network requests from the **Journey** module.

  Learn more in [Customizing requests from the Journey module in JavaScript](../../customization/requests/javascript-request-interceptors.html).
