UNPKG

@onboardbase/cli

Version:

[![Version](https://img.shields.io/npm/v/@onboardbase/cli.svg)](https://www.npmjs.com/package/@onboardbase/cli) [![Downloads/week](https://img.shields.io/npm/dw/@onboardbase/cli.svg)](https://www.npmjs.com/package/@onboardbase/cli) [![License](https://img

34 lines (33 loc) 1.39 kB
import { BaseService } from "../../common/base.service"; import { ConfigManager as NewConfigManager } from "../../config"; import { LoginInput } from "./types"; export declare class BaseAuthService extends BaseService { constructor(configManager?: NewConfigManager); /** * Logs in the user. * * @param flags - The login flags. * @param shouldCloseProcess - Indicates whether the process should be closed after login. * @param additionalProcesses - Additional processes to be handled after login. */ login({ flags, shouldCloseProcess, additionalProcesses, }: LoginInput): Promise<any>; private _getLoginScope; /** * Handles the process of opening the authentication URL in the default browser. * The method also waits for the authorization to complete (by polling at an interval). * * @param authUrl The authentication URL to be opened. * @param authCode The authorization code. */ private _handleOpeningUrlAndWaitingForAuthToComplete; private _askToOpenAuthUrlInBrowser; private _isLoginScopedToProjectPath; private _informUserToForceOverwriteThenExit; private _getAuthAndPollingCode; private _getAuthUrl; private _askWhereToScopeLogin; private _handleAuthentication; private _handlePollingAtInterval; private _handleTimeoutExceeded; private _handleSuccessfulAuth; }