Development

Creating a reusable auth provider in Visual Studio Code

September 12, 2022

A couple of months ago, I wrote about how you could create an authentication provider for Visual Studio Code. In this article, we will take it further and make it reusable by other extensions. The reason for creating a reusable authentication provider could differ per solution. Maybe you want to make one for other extensions to leverage, or your company wants to release multiple extensions that can all use the same type of authentication.

Read more

Adding editor actions for your extension webview in Visual Studio Code

September 2, 2022

In Visual Studio Code extension development, you may need a webview to give the developer/user the best experience for using your extension/functionalities. Webviews come in different flavors. You can open them in a panel or an editor view, but there is a difference between both when it comes to showing actions or enabling/disabling commands.

Read more

Opening folders in Visual Studio Code from an extension

June 2, 2022

I used the vscode.openFolder command in one of my extensions, one of the built-in commands that is available. The command can be combined with a URI argument to open the folder or workspace. While testing it out, the command worked fine on macOS and Linux but gave issues on Windows paths.

Read more

How to callback to your extension from outside Visual Studio Code

May 5, 2022

While creating the authentication provider, I discovered a helpful handler in the Visual Studio Code API, which allows you to handle system-wide URIs and callback into your extension. In the case of the authentication provider, I use it to retrieve the token that gets passed from the callback, but you can use the registerUriHandler for many more scenarios.

Read more

Create an Authentication Provider for Visual Studio Code

April 28, 2022

Previously I wrote how you could use the Microsoft Authentication Provider in your Visual Studio Code extension to custom Azure AD applications. In this article, we go a step further and create our authentication provider from scratch. As By default, VS Code supports the github, github-enterprise, and microsoft authentication providers. If you use another service or have your authentication service, you will likely want to create your Authentication Provider.

Read more