Handles the creation of a web server for web based login flows.

Usage:

const oauthConfig = {
loginUrl: this.flags.instanceurl,
clientId: this.flags.clientid,
};

const oauthServer = await WebOAuthServer.create({ oauthConfig });
await oauthServer.start();
await open(oauthServer.getAuthorizationUrl(), { wait: false });
const authInfo = await oauthServer.authorizeAndSave();

Hierarchy

Constructors

Properties

DEFAULT_PORT: number = 1717

Methods

  • Returns the authorization url that's used for the login flow

    Returns string

  • Returns the configured oauthLocalPort or the WebOAuthServer.DEFAULT_PORT

    Returns Promise<number>