@nebius/js-sdk - v0.2.54
    Preparing search index...
    • Starts a loopback callback server and obtains an OAuth authorization code.

      The function writes the authorization URL, optionally opens it in a browser, and waits until the browser redirects to the local server. timeoutMs limits that wait. The returned verifier is secret and is required by getToken.

      Parameters

      • params: {
            authEndpoint: string;
            clientId: string;
            federationId: string;
            logger?: Logger;
            noBrowserOpen?: boolean;
            timeoutMs?: number;
            writer?: (s: string) => void;
        }
        • authEndpoint: string

          Contains the auth endpoint.

        • clientId: string

          Contains the client ID.

        • federationId: string

          Contains the federation ID.

        • Optionallogger?: Logger

          Contains the logger.

        • OptionalnoBrowserOpen?: boolean

          Contains the no browser open.

        • OptionaltimeoutMs?: number

          Contains the timeout ms.

        • Optionalwriter?: (s: string) => void

          Contains the writer.

      Returns Promise<{ code: string; redirectUri: string; state: string; verifier: string }>