Orchestration SDKs

Starting an authentication journey in JavaScript

PingOne Advanced Identity Cloud PingAM JavaScript


After instantiating the journey class and providing the configuration, you can call the start() method to begin an authentication journey, passing in the name of the journey to launch:

Starting a journey
let step = await journeyClient.start({
  journey: 'sdkUsernamePasswordJourney',
});

You can optionally insert query parameters when starting a journey:

Adding parameters when starting a journey
let step = await journeyClient.start({
  journey: 'sdkUsernamePasswordJourney',
  query: {
    forceAuth: true,
    noSession: true,
  },
});

The query parameters you might use in the start() method includes the following:

forceAuth

Set this parameter to true to force traversal of an authentication journey, even if the user already has a valid session.

Default is false.

noSession

Set this parameter to true to prevent the authentication journey from issuing a new session token upon successful completion.

Default is false.