mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 10:08:49 +01:00
Use device flow over PAT when we are running in a server full environment but not in a supported uri (#139255)
* initial attempt * use github-authentication instead * rework error handling * update copy * explain why Workspace
This commit is contained in:
committed by
GitHub
parent
e7b3724e0c
commit
f67a8b753f
18
extensions/github-authentication/src/common/env.ts
Normal file
18
extensions/github-authentication/src/common/env.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import { Uri } from 'vscode';
|
||||
|
||||
const VALID_DESKTOP_CALLBACK_SCHEMES = [
|
||||
'vscode',
|
||||
'vscode-insiders',
|
||||
'code-oss',
|
||||
'vscode-wsl',
|
||||
'vscode-exploration'
|
||||
];
|
||||
|
||||
// This comes from the GitHub Authentication server
|
||||
export function isSupportedEnvironment(url: Uri): boolean {
|
||||
return VALID_DESKTOP_CALLBACK_SCHEMES.includes(url.scheme) || url.authority.endsWith('vscode.dev') || url.authority.endsWith('github.dev');
|
||||
}
|
||||
Reference in New Issue
Block a user