/** * OAuth 2.0 Device Authorization Grant (Device Flow) * RFC 8628: https://tools.ietf.org/html/rfc8628 * * Used for CLI and non-browser environments where user authenticates * on a separate device (phone, browser on another machine, etc.) */ export interface DeviceAuthResponse { device_code: string; user_code: string; verification_uri: string; verification_uri_complete?: string; expires_in: number; interval: number; } export interface TokenResponse { access_token: string; refresh_token?: string; expires_in: number; token_type: string; scope?: string; } export interface OAuthConfig { clientId: string; clientSecret?: string; deviceAuthUrl: string; tokenUrl: string; scopes?: string[]; } export declare class DeviceFlowAuthenticator { private config; private stdin; constructor(config: OAuthConfig, stdin?: NodeJS.ReadStream); /** * Complete OAuth Device Flow authentication */ authenticate(): Promise; /** * Step 1: Request device and user codes from authorization server */ private requestDeviceCode; /** * Step 2: Display instructions to user */ private displayUserInstructions; /** * Step 3: Poll token endpoint until user authorizes */ private pollForToken; private sleep; } //# sourceMappingURL=oauth-device-flow.d.ts.map