/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import { Browser, Page } from 'playwright';6import { TestContext } from './context.js';78/**9* Handles GitHub authentication flows in the browser.10*/11export class GitHubAuth {12// private readonly username = process.env.GITHUB_ACCOUNT;13// private readonly password = process.env.GITHUB_PASSWORD;1415public constructor(private readonly context: TestContext) { }1617/**18* Runs GitHub device authentication flow in a browser.19* @param browser Browser to use.20* @param code Device authentication code to use.21*/22public async runDeviceCodeFlow(browser: Browser, code: string) {23this.context.log(`Running GitHub device flow with code ${code}`);24const page = await browser.newPage();25await page.goto('https://github.com/login/device');26}2728/**29* Runs GitHub user authentication flow in the browser.30* @param page Authentication page.31*/32public async runUserWebFlow(page: Page) {33this.context.log(`Running GitHub browser flow at ${page.url()}`);34}35}363738