From 55ee805f9049c2865db764f31b611effcf7b925d Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Wed, 20 Sep 2023 13:31:58 +0200 Subject: [PATCH] Improve signin experience --- .../Auth/DeviceFlow/Invoke-GitHubDeviceCodeLogin.ps1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/GitHub/private/Auth/DeviceFlow/Invoke-GitHubDeviceCodeLogin.ps1 b/src/GitHub/private/Auth/DeviceFlow/Invoke-GitHubDeviceCodeLogin.ps1 index 9da58ecd6..6f766e39f 100644 --- a/src/GitHub/private/Auth/DeviceFlow/Invoke-GitHubDeviceCodeLogin.ps1 +++ b/src/GitHub/private/Auth/DeviceFlow/Invoke-GitHubDeviceCodeLogin.ps1 @@ -31,8 +31,12 @@ $userCode = $deviceCodeResponse.user_code $verificationUri = $deviceCodeResponse.verification_uri + Write-Host "Please visit: $verificationUri" - Write-Host "and enter code: $userCode" + Write-Host " and enter code: $userCode (added to clipboard)" + $userCode | Set-Clipboard + Read-Host "Press Enter to open a browser..." + Start-Process $verificationUri $tokenResponse = Wait-GitHubToken -DeviceCode $deviceCode -ClientID $ClientID -Interval $interval