import { Result } from '../../shared/result/Result'; import type { IAuthenticationService } from '../ports/IAuthenticationService'; /** * Use case for initiating the manual login flow. * * Opens a visible browser window where the user can log into iRacing directly. * GridPilot never sees the credentials - it only waits for the URL to change * indicating successful login. */ export class InitiateLoginUseCase { constructor(private readonly authService: IAuthenticationService) {} /** * Execute the login flow. * Opens browser and waits for user to complete manual login. * * @returns Result indicating success (login complete) or failure (cancelled/timeout) */ async execute(): Promise> { return this.authService.initiateLogin(); } }