Skip to content

Commit c68d433

Browse files
1 parent 1b9ddd3 commit c68d433

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

extensions/github-authentication/src/githubServer.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,19 +220,20 @@ export class GitHubServer implements IGitHubServer {
220220

221221
const json = await result.json() as IGitHubDeviceCodeResponse;
222222

223-
await vscode.env.clipboard.writeText(json.user_code);
224223

225224
const modalResult = await vscode.window.showInformationMessage(
226225
localize('code.title', "Your Code: {0}", json.user_code),
227226
{
228227
modal: true,
229-
detail: localize('code.detail', "The above one-time code has been copied to your clipboard. To finish authenticating, paste it on GitHub.")
230-
}, 'Continue to GitHub');
228+
detail: localize('code.detail', "To finish authenticating, navigate to GitHub and paste in the above one-time code.")
229+
}, 'Copy & Continue to GitHub');
231230

232-
if (modalResult !== 'Continue to GitHub') {
231+
if (modalResult !== 'Copy & Continue to GitHub') {
233232
throw new Error('Cancelled');
234233
}
235234

235+
await vscode.env.clipboard.writeText(json.user_code);
236+
236237
const uriToOpen = await vscode.env.asExternalUri(vscode.Uri.parse(json.verification_uri));
237238
await vscode.env.openExternal(uriToOpen);
238239

0 commit comments

Comments
 (0)