Get an authentication session matching the desired scopes. Rejects if a provider with providerId is not registered, or if the user does not consent to sharing authentication information with the extension. If there are multiple sessions with the same scopes, the user will be shown a quickpick to select which account they would like to use.
Currently, there are only two authentication providers that are contributed from built in extensions to the editor that implement GitHub and Microsoft authentication: their providerId's are 'github' and 'microsoft'.
The id of the provider to use
A list of scopes representing the permissions requested. These are dependent on the authentication provider
The {@link GetSessionOptions} to use
A thenable that resolves to an authentication session
Get an authentication session matching the desired scopes. Rejects if a provider with providerId is not registered, or if the user does not consent to sharing authentication information with the extension. If there are multiple sessions with the same scopes, the user will be shown a quickpick to select which account they would like to use.
Currently, there are only two authentication providers that are contributed from built in extensions to the editor that implement GitHub and Microsoft authentication: their providerId's are 'github' and 'microsoft'.
The id of the provider to use
A list of scopes representing the permissions requested. These are dependent on the authentication provider
The {@link GetSessionOptions} to use
A thenable that resolves to an authentication session if available, or undefined if there are no sessions
An Event which fires when the authentication sessions of an authentication provider have been added, removed, or changed.
Register an authentication provider.
There can only be one provider per id and an error is being thrown when an id has already been used by another provider. Ids are case-sensitive.
The unique identifier of the provider.
The human-readable name of the provider.
The authentication provider provider.
A Disposable that unregisters this provider when being disposed.
VS Code 插件开发中文文档 | VS Code 中文文档 | 官网文档
Generated by TypeDoc
Namespace for authentication.