add proposed forceRecreate option on getSession. Related to #129064

This commit is contained in:
Tyler Leonhardt
2021-07-20 16:09:36 -07:00
parent 3b9c85ab19
commit 37687f06b6
6 changed files with 93 additions and 14 deletions

View File

@@ -226,6 +226,9 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
const authentication: typeof vscode.authentication = {
getSession(providerId: string, scopes: readonly string[], options?: vscode.AuthenticationGetSessionOptions) {
if (options?.forceRecreate) {
checkProposedApiEnabled(extension);
}
return extHostAuthentication.getSession(extension, providerId, scopes, options as any);
},
get onDidChangeSessions(): Event<vscode.AuthenticationSessionsChangeEvent> {